Skip to content

Commit d320568

Browse files
committed
chore: add back build extension
1 parent 53ba833 commit d320568

9 files changed

Lines changed: 30 additions & 266 deletions

File tree

packages/js/manifests/polywrap/src/formats/polywrap.build/0.3.0.ts

Lines changed: 0 additions & 105 deletions
This file was deleted.

packages/js/manifests/polywrap/src/formats/polywrap.build/index.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,35 @@ import {
1111
import {
1212
BuildManifest as BuildManifest_0_2_0,
1313
} from "./0.2.0";
14-
import {
15-
BuildManifest as BuildManifest_0_3_0,
16-
} from "./0.3.0";
1714

1815
export {
1916
BuildManifest_0_1_0,
2017
BuildManifest_0_2_0,
21-
BuildManifest_0_3_0,
2218
};
2319

2420
export enum BuildManifestFormats {
2521
// NOTE: Patch fix for backwards compatability
2622
"v0.1" = "0.1",
2723
"v0.1.0" = "0.1.0",
2824
"v0.2.0" = "0.2.0",
29-
"v0.3.0" = "0.3.0",
3025
}
3126

3227
export const BuildManifestSchemaFiles: Record<string, string> = {
3328
// NOTE: Patch fix for backwards compatability
3429
"0.1": "formats/polywrap.build/0.1.0.json",
3530
"0.1.0": "formats/polywrap.build/0.1.0.json",
3631
"0.2.0": "formats/polywrap.build/0.2.0.json",
37-
"0.3.0": "formats/polywrap.build/0.3.0.json",
3832
}
3933

4034
export type AnyBuildManifest =
4135
| BuildManifest_0_1_0
4236
| BuildManifest_0_2_0
43-
| BuildManifest_0_3_0
4437

4538

4639

47-
export type BuildManifest = BuildManifest_0_3_0;
40+
export type BuildManifest = BuildManifest_0_2_0;
4841

49-
export const latestBuildManifestFormat = BuildManifestFormats["v0.3.0"]
42+
export const latestBuildManifestFormat = BuildManifestFormats["v0.2.0"]
5043

5144
export { migrateBuildManifest } from "./migrate";
5245

packages/js/manifests/polywrap/src/formats/polywrap.build/migrators/0.2.0_to_0.3.0.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Migrator } from "../../../migrations";
22
import { migrate as migrate_0_1_0_to_0_2_0 } from "./0.1.0_to_0.2.0";
3-
import { migrate as migrate_0_2_0_to_0_3_0 } from "./0.2.0_to_0.3.0";
43

54
export const migrators: Migrator[] = [
65
{
@@ -12,10 +11,5 @@ export const migrators: Migrator[] = [
1211
from: "0.1.0",
1312
to: "0.2.0",
1413
migrate: migrate_0_1_0_to_0_2_0
15-
},
16-
{
17-
from: "0.2.0",
18-
to: "0.3.0",
19-
migrate: migrate_0_2_0_to_0_3_0
2014
}
2115
];

packages/js/manifests/polywrap/src/formats/polywrap.build/validate.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111

1212
import BuildManifestSchema_0_1_0 from "@polywrap/polywrap-manifest-schemas/formats/polywrap.build/0.1.0.json";
1313
import BuildManifestSchema_0_2_0 from "@polywrap/polywrap-manifest-schemas/formats/polywrap.build/0.2.0.json";
14-
import BuildManifestSchema_0_3_0 from "@polywrap/polywrap-manifest-schemas/formats/polywrap.build/0.3.0.json";
1514

1615
import {
1716
Schema,
@@ -29,7 +28,6 @@ const schemas: BuildManifestSchemas = {
2928
"0.1": BuildManifestSchema_0_1_0,
3029
"0.1.0": BuildManifestSchema_0_1_0,
3130
"0.2.0": BuildManifestSchema_0_2_0,
32-
"0.3.0": BuildManifestSchema_0_3_0,
3331
};
3432

3533
const validator = new Validator();

packages/js/manifests/polywrap/src/formats/polywrap/0.3.0.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ export interface PolywrapManifest {
4545
* Project resources folder
4646
*/
4747
resources?: string;
48+
/**
49+
* Project extension manifest files.
50+
*/
51+
extensions?: {
52+
/**
53+
* Path to the project build manifest file.
54+
*/
55+
build?: string;
56+
};
4857
__type: "PolywrapManifest";
4958
}
5059
export interface ImportAbis {

packages/js/manifests/polywrap/src/formats/polywrap/migrators/0.2.0_to_0.3.0.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@ export function migrate(migrate: OldManifest, logger?: ILogger): NewManifest {
77
logger?.warn(
88
`The Polywrap Meta Manifest has been deprecated, please use the new "resources" field in the Polywrap Manifest.`
99
);
10+
delete migrate.extensions.meta;
1011
}
11-
if (migrate.extensions?.build) {
12+
if (migrate.extensions?.deploy) {
1213
logger?.warn(
13-
`The Polywrap Build Manifest now references the Polywrap Manifest directly, please use the new "project" field in the Polywrap Build Manifest.`
14+
`The Polywrap Deploy Manifest no longer needs to be listed as a project extension, and can be used as a standalone.`
1415
);
16+
delete migrate.extensions.deploy;
1517
}
16-
if (migrate.extensions) {
18+
if (migrate.extensions?.infra) {
1719
logger?.warn(
18-
`The Polywrap Manifest Extensions concept has been removed, and instead has been renamed to Command Manifests.`
20+
`The Polywrap Infra Manifest no longer needs to be listed as a project extension, and can be used as a standalone.`
1921
);
20-
delete migrate.extensions;
22+
delete migrate.extensions.infra;
2123
}
2224
return {
2325
...migrate,

packages/manifests/polywrap/formats/polywrap.build/0.3.0.json

Lines changed: 0 additions & 129 deletions
This file was deleted.

packages/manifests/polywrap/formats/polywrap/0.3.0.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,18 @@
5656
"description": "Project resources folder",
5757
"type": "string",
5858
"pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.@]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.?[\\w\\-\\.]*\\/?$"
59+
},
60+
"extensions": {
61+
"description": "Project extension manifest files.",
62+
"type": "object",
63+
"additionalProperties": false,
64+
"properties": {
65+
"build": {
66+
"description": "Path to the project build manifest file.",
67+
"type": "string",
68+
"pattern": "^\\.?\\.?(\\/[\\w\\-\\.@]+|\\/\\.\\.|\\/\\.)*\\/[\\w\\-\\.]+\\.(yaml|json)$"
69+
}
70+
}
5971
}
6072
},
6173
"definitions": {

0 commit comments

Comments
 (0)