@superblocksteam/cli 1.10.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +87 -0
- package/README.md +6 -6
- package/assets/custom-components/setup/package.json +1 -1
- package/assets/custom-components/setup/tsconfig.json +0 -1
- package/bin/dev +5 -7
- package/bin/run +1 -3
- package/dist/appendHotReloadEventPlugin.mjs +43 -0
- package/dist/commands/commits.d.mts +18 -0
- package/dist/commands/{commits.js → commits.mjs} +59 -67
- package/dist/commands/components/{create.d.ts → create.d.mts} +2 -2
- package/dist/commands/components/{create.js → create.mjs} +84 -93
- package/dist/commands/components/{register.d.ts → register.d.mts} +1 -1
- package/dist/commands/components/register.mjs +12 -0
- package/dist/commands/components/{upload.d.ts → upload.d.mts} +2 -2
- package/dist/commands/components/{upload.js → upload.mjs} +39 -43
- package/dist/commands/components/{watch.d.ts → watch.d.mts} +1 -1
- package/dist/commands/components/{watch.js → watch.mjs} +29 -36
- package/dist/commands/config/{set.d.ts → set.d.mts} +2 -2
- package/dist/commands/config/{set.js → set.mjs} +28 -32
- package/dist/commands/{init.d.ts → init.d.mts} +4 -4
- package/dist/commands/{init.js → init.mjs} +58 -64
- package/dist/commands/{login.d.ts → login.d.mts} +1 -1
- package/dist/commands/login.mjs +55 -0
- package/dist/commands/{migrate.d.ts → migrate.d.mts} +1 -1
- package/dist/commands/{migrate.js → migrate.mjs} +34 -42
- package/dist/commands/pull.d.mts +17 -0
- package/dist/commands/{pull.js → pull.mjs} +72 -80
- package/dist/commands/push.d.mts +15 -0
- package/dist/commands/{push.js → push.mjs} +81 -90
- package/dist/commands/{rm.d.ts → rm.d.mts} +2 -2
- package/dist/commands/{rm.js → rm.mjs} +34 -40
- package/dist/common/{authenticated-command.js → authenticated-command.mjs} +65 -75
- package/dist/common/defaults/{create-component-defaults.js → create-component-defaults.mjs} +2 -7
- package/dist/common/{version-control.d.ts → version-control.d.mts} +1 -1
- package/dist/common/{version-control.js → version-control.mjs} +170 -202
- package/dist/index.js +1 -5
- package/dist/{productionCssPlugin.js → productionCssPlugin.mjs} +4 -10
- package/dist/{reactShimPlugin.js → reactShimPlugin.mjs} +17 -24
- package/dist/util/migrationWarningsForApplications.mjs +47 -0
- package/dist/util/{migrationsForDotfiles.js → migrationsForDotfiles.mjs} +10 -17
- package/oclif.manifest.json +284 -171
- package/package.json +43 -41
- package/dist/appendHotReloadEventPlugin.js +0 -48
- package/dist/commands/commits.d.ts +0 -18
- package/dist/commands/components/register.js +0 -15
- package/dist/commands/login.js +0 -61
- package/dist/commands/pull.d.ts +0 -17
- package/dist/commands/push.d.ts +0 -15
- package/dist/util/migrationWarningsForApplications.js +0 -52
- /package/dist/{appendHotReloadEventPlugin.d.ts → appendHotReloadEventPlugin.d.mts} +0 -0
- /package/dist/common/{authenticated-command.d.ts → authenticated-command.d.mts} +0 -0
- /package/dist/common/defaults/{create-component-defaults.d.ts → create-component-defaults.d.mts} +0 -0
- /package/dist/{productionCssPlugin.d.ts → productionCssPlugin.d.mts} +0 -0
- /package/dist/{reactShimPlugin.d.ts → reactShimPlugin.d.mts} +0 -0
- /package/dist/util/{migrationWarningsForApplications.d.ts → migrationWarningsForApplications.d.mts} +0 -0
- /package/dist/util/{migrationsForDotfiles.d.ts → migrationsForDotfiles.d.mts} +0 -0
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superblocksteam/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Official Superblocks CLI",
|
|
5
5
|
"bin": {
|
|
6
|
-
"superblocks": "bin/run"
|
|
6
|
+
"superblocks": "./bin/run"
|
|
7
7
|
},
|
|
8
8
|
"homepage": "https://www.superblocks.com",
|
|
9
9
|
"license": "Superblocks Community Software License",
|
|
@@ -15,65 +15,54 @@
|
|
|
15
15
|
"/oclif.manifest.json"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
+
"@oclif/core": "^4.2.8",
|
|
19
|
+
"@oclif/plugin-help": "^6.2.26",
|
|
20
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
18
21
|
"axios": "^1.4.0",
|
|
19
|
-
"
|
|
20
|
-
"@oclif/plugin-help": "^5.2.16",
|
|
21
|
-
"@oclif/plugin-plugins": "^3.1.10",
|
|
22
|
-
"@superblocksteam/sdk": "1.10.0",
|
|
23
|
-
"@superblocksteam/util": "1.10.0",
|
|
24
|
-
"@vitejs/plugin-react": "^4.1.0",
|
|
25
|
-
"colorette": "^2.0.19",
|
|
22
|
+
"colorette": "^2.0.20",
|
|
26
23
|
"enquirer": "^2.4.1",
|
|
27
24
|
"fs-extra": "^11.1.1",
|
|
28
25
|
"listr2": "6.6.0",
|
|
29
|
-
"lodash": "^4.17.21",
|
|
26
|
+
"lodash-es": "^4.17.21",
|
|
30
27
|
"semver": "^7.5.4",
|
|
31
28
|
"simple-git": "^3.20.0",
|
|
32
29
|
"slugify": "^1.6.6",
|
|
33
|
-
"vite": "^
|
|
34
|
-
"
|
|
35
|
-
"
|
|
30
|
+
"vite": "^6.2.0",
|
|
31
|
+
"yaml": "^2.6.1",
|
|
32
|
+
"@superblocksteam/sdk": "1.13.0",
|
|
33
|
+
"@superblocksteam/util": "1.13.0"
|
|
36
34
|
},
|
|
37
35
|
"devDependencies": {
|
|
38
|
-
"@oclif/test": "^
|
|
36
|
+
"@oclif/test": "^4.1.11",
|
|
39
37
|
"@types/babel__core": "^7.20.0",
|
|
40
38
|
"@types/chai": "^4",
|
|
41
39
|
"@types/fs-extra": "^11.0.1",
|
|
40
|
+
"@types/lodash-es": "^4.17.12",
|
|
42
41
|
"@types/mocha": "^9.0.0",
|
|
43
42
|
"@types/node": "^20.17.0",
|
|
44
|
-
"@
|
|
45
|
-
"@typescript-eslint/
|
|
43
|
+
"@types/semver": "^7.5.8",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^8.25.0",
|
|
45
|
+
"@typescript-eslint/parser": "^8.25.0",
|
|
46
46
|
"chai": "^4",
|
|
47
|
-
"eslint": "^
|
|
48
|
-
"eslint-config-prettier": "
|
|
49
|
-
"eslint-plugin-import": "2.
|
|
50
|
-
"eslint-plugin-
|
|
47
|
+
"eslint": "^9.21.0",
|
|
48
|
+
"eslint-config-prettier": "10.0.2",
|
|
49
|
+
"eslint-plugin-import": "2.31.0",
|
|
50
|
+
"eslint-plugin-mocha": "^10.5.0",
|
|
51
|
+
"eslint-plugin-prettier": "5.2.3",
|
|
51
52
|
"eslint-plugin-unicorn": "^47.0.0",
|
|
53
|
+
"globals": "^15.9.0",
|
|
52
54
|
"mocha": "^9",
|
|
53
|
-
"oclif": "^
|
|
54
|
-
"prettier": "^
|
|
55
|
+
"oclif": "^4.17.32",
|
|
56
|
+
"prettier": "^3.5.2",
|
|
55
57
|
"shx": "^0.3.3",
|
|
56
58
|
"ts-node": "^10.9.1",
|
|
57
|
-
"tslib": "^2.
|
|
58
|
-
"typescript": "^5.
|
|
59
|
-
|
|
60
|
-
"scripts": {
|
|
61
|
-
"preinstall": "node -e \"if (process.versions.node.split('.')[0] < 16) { console.error('Incompatible Node version: Please use Node.js v16 or higher'); process.exit(1);}\"",
|
|
62
|
-
"build": "tsc --build",
|
|
63
|
-
"clean": "npm run clean:build && rm -rf node_modules",
|
|
64
|
-
"clean:build": "tsc --build --clean && rm -rf dist tsconfig.tsbuildinfo",
|
|
65
|
-
"lint": "eslint . --ext .ts --config .eslintrc.json",
|
|
66
|
-
"lint:fix": "eslint . --ext .ts --config .eslintrc.json --fix",
|
|
67
|
-
"postpack": "shx rm -f oclif.manifest.json",
|
|
68
|
-
"posttest": "npm run lint",
|
|
69
|
-
"prepack": "npm run build && oclif manifest && oclif readme",
|
|
70
|
-
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
71
|
-
"typecheck": "tsc --noEmit",
|
|
72
|
-
"update-readme": "oclif readme"
|
|
59
|
+
"tslib": "^2.8.0",
|
|
60
|
+
"typescript": "^5.7.0",
|
|
61
|
+
"vite-plugin-inspect": "^11.0.0"
|
|
73
62
|
},
|
|
74
63
|
"engines": {
|
|
75
|
-
"node": ">=
|
|
76
|
-
"npm": ">=
|
|
64
|
+
"node": ">=20.0.0",
|
|
65
|
+
"npm": ">=9.0.0"
|
|
77
66
|
},
|
|
78
67
|
"keywords": [
|
|
79
68
|
"oclif"
|
|
@@ -98,5 +87,18 @@
|
|
|
98
87
|
"description": "Manage Superblocks configuration"
|
|
99
88
|
}
|
|
100
89
|
}
|
|
90
|
+
},
|
|
91
|
+
"scripts": {
|
|
92
|
+
"preinstall": "node -e \"if (process.versions.node.split('.')[0] < 20) { console.error('Incompatible Node version: Please use Node.js v20 or higher'); process.exit(1);}\"",
|
|
93
|
+
"build": "tsc --build",
|
|
94
|
+
"clean": "npm run clean:build && rm -rf node_modules",
|
|
95
|
+
"clean:build": "rm -rf dist tsconfig.tsbuildinfo",
|
|
96
|
+
"lint": "eslint .",
|
|
97
|
+
"lint:fix": "eslint . --fix",
|
|
98
|
+
"check": "pnpm run lint && pnpm run typecheck",
|
|
99
|
+
"posttest": "npm run lint",
|
|
100
|
+
"test": "NODE_OPTIONS='--loader ts-node/esm' mocha --forbid-only \"test/**/*.test.*ts\"",
|
|
101
|
+
"typecheck": "tsc --noEmit",
|
|
102
|
+
"update-readme": "oclif readme"
|
|
101
103
|
}
|
|
102
|
-
}
|
|
104
|
+
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appendHotReloadEventPlugin = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
-
const sdk_1 = require("@superblocksteam/sdk");
|
|
7
|
-
const util_1 = require("@superblocksteam/util");
|
|
8
|
-
const appendHotReloadEventPlugin = (getBranch) => {
|
|
9
|
-
return {
|
|
10
|
-
name: "append-code-plugin",
|
|
11
|
-
enforce: "pre",
|
|
12
|
-
apply: "serve",
|
|
13
|
-
async handleHotUpdate(ctx) {
|
|
14
|
-
const isConfigFile = path_1.default.basename(ctx.file) === "config.ts";
|
|
15
|
-
if (!isConfigFile)
|
|
16
|
-
return;
|
|
17
|
-
try {
|
|
18
|
-
const result = await (0, util_1.getLocalTokenWithUrl)();
|
|
19
|
-
if (!result || !("token" in result)) {
|
|
20
|
-
throw new Error("Please run `superblocks login` to login.");
|
|
21
|
-
}
|
|
22
|
-
const { token, superblocksBaseUrl } = result;
|
|
23
|
-
const resourceConfig = await (0, util_1.getSuperblocksApplicationConfigJson)();
|
|
24
|
-
const { configs, hasError } = await (0, util_1.getComponentConfigs)(true);
|
|
25
|
-
if (hasError)
|
|
26
|
-
return;
|
|
27
|
-
const [rootSettings] = await (0, util_1.getSuperblocksMonorepoConfigJson)(true);
|
|
28
|
-
const sdk = new sdk_1.SuperblocksSdk(token, superblocksBaseUrl, rootSettings.metadata.cliVersion);
|
|
29
|
-
console.log("Registering components...");
|
|
30
|
-
const branch = await getBranch();
|
|
31
|
-
const headers = {
|
|
32
|
-
[util_1.COMPONENT_EVENT_HEADER]: util_1.ComponentEvent.REGISTER,
|
|
33
|
-
};
|
|
34
|
-
await sdk.registerComponents(resourceConfig.id, configs, branch, headers);
|
|
35
|
-
console.log("Re-registered components!");
|
|
36
|
-
ctx.server.ws.send({
|
|
37
|
-
type: "custom",
|
|
38
|
-
event: "config-reloaded",
|
|
39
|
-
data: {},
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
catch (e) {
|
|
43
|
-
console.error(e.message);
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
exports.appendHotReloadEventPlugin = appendHotReloadEventPlugin;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { GetCommitsResponseBody } from "@superblocksteam/sdk";
|
|
2
|
-
import { AuthenticatedCommand } from "../common/authenticated-command";
|
|
3
|
-
export default class Commits extends AuthenticatedCommand {
|
|
4
|
-
static description: string;
|
|
5
|
-
static examples: string[];
|
|
6
|
-
static flags: {
|
|
7
|
-
branch: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
-
limit: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
-
offset: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
-
};
|
|
11
|
-
static args: {
|
|
12
|
-
resource_path: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
|
|
13
|
-
};
|
|
14
|
-
run(): Promise<void>;
|
|
15
|
-
private createTasks;
|
|
16
|
-
private getResourceIdToShowCommits;
|
|
17
|
-
printCommits(commits: GetCommitsResponseBody, branch?: string): void;
|
|
18
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const util_1 = require("@superblocksteam/util");
|
|
4
|
-
const authenticated_command_1 = require("../../common/authenticated-command");
|
|
5
|
-
class Register extends authenticated_command_1.AuthenticatedApplicationCommand {
|
|
6
|
-
async run() {
|
|
7
|
-
const headers = {
|
|
8
|
-
[util_1.COMPONENT_EVENT_HEADER]: util_1.ComponentEvent.REGISTER,
|
|
9
|
-
};
|
|
10
|
-
await this.registerComponents(headers);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
Register.description = "Registers all local component config files";
|
|
14
|
-
Register.examples = ["superblocks components register"];
|
|
15
|
-
exports.default = Register;
|
package/dist/commands/login.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const core_1 = require("@oclif/core");
|
|
4
|
-
const sdk_1 = require("@superblocksteam/sdk");
|
|
5
|
-
const util_1 = require("@superblocksteam/util");
|
|
6
|
-
const colorette_1 = require("colorette");
|
|
7
|
-
const enquirer_1 = require("enquirer");
|
|
8
|
-
const lodash_1 = require("lodash");
|
|
9
|
-
class Login extends core_1.Command {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.DEFAULT_BASE_URL = "https://app.superblocks.com/";
|
|
13
|
-
}
|
|
14
|
-
async run() {
|
|
15
|
-
var _a;
|
|
16
|
-
const { flags } = await this.parse(Login);
|
|
17
|
-
let token = flags.token;
|
|
18
|
-
const result = await (0, util_1.getLocalTokenWithUrlIfExists)();
|
|
19
|
-
const superblocksBaseUrl = (_a = result === null || result === void 0 ? void 0 : result.superblocksBaseUrl) !== null && _a !== void 0 ? _a : this.DEFAULT_BASE_URL;
|
|
20
|
-
if (!token) {
|
|
21
|
-
if (result && "token" in result) {
|
|
22
|
-
token = result.token;
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
const tokenPageUrl = new URL("personal-settings#apiKey", superblocksBaseUrl).href;
|
|
26
|
-
token = (await (0, enquirer_1.prompt)({
|
|
27
|
-
type: "password",
|
|
28
|
-
name: "token",
|
|
29
|
-
message: `Enter your Superblocks API key (then press Enter) which can be found at ${tokenPageUrl}`,
|
|
30
|
-
validate: (response) => !(0, lodash_1.isEmpty)(response.trim()),
|
|
31
|
-
})).token;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
this.log();
|
|
35
|
-
try {
|
|
36
|
-
const sdk = new sdk_1.SuperblocksSdk(token, superblocksBaseUrl, this.config.version);
|
|
37
|
-
const user = await sdk.fetchCurrentUser();
|
|
38
|
-
await (0, util_1.saveApiToken)(superblocksBaseUrl, token);
|
|
39
|
-
this.log((0, colorette_1.green)(`Welcome to the Superblocks 🐨 CLI ${user.user.name}!`));
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
if (error instanceof util_1.FileAccessError) {
|
|
43
|
-
this.log((0, colorette_1.red)("Could not save token, ensure the Superblocks CLI has access to create folders in your home directory."));
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
if (error.message) {
|
|
47
|
-
this.log((0, colorette_1.red)(error.message));
|
|
48
|
-
}
|
|
49
|
-
this.log((0, colorette_1.red)(`Login failed. Ensure you've copied the correct token from ${superblocksBaseUrl}. If using a different domain, run "superblocks help config set" for configuration options.`));
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
Login.description = "Authenticate with Superblocks cloud";
|
|
54
|
-
Login.flags = {
|
|
55
|
-
// flag with a value (-t, --token=VALUE)
|
|
56
|
-
token: core_1.Flags.string({
|
|
57
|
-
char: "t",
|
|
58
|
-
description: "Superblocks user API key",
|
|
59
|
-
}),
|
|
60
|
-
};
|
|
61
|
-
exports.default = Login;
|
package/dist/commands/pull.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { AuthenticatedCommand } from "../common/authenticated-command";
|
|
2
|
-
export default class Pull extends AuthenticatedCommand {
|
|
3
|
-
static description: string;
|
|
4
|
-
static examples: string[];
|
|
5
|
-
static flags: {
|
|
6
|
-
mode: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
-
branch: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
-
"commit-id": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
-
"skip-signing-verification": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
-
};
|
|
11
|
-
static args: {
|
|
12
|
-
resource_path: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
|
|
13
|
-
};
|
|
14
|
-
run(): Promise<void>;
|
|
15
|
-
private createTasks;
|
|
16
|
-
private getResourceIdsToPull;
|
|
17
|
-
}
|
package/dist/commands/push.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AuthenticatedCommand } from "../common/authenticated-command";
|
|
2
|
-
export default class Push extends AuthenticatedCommand {
|
|
3
|
-
static description: string;
|
|
4
|
-
static examples: string[];
|
|
5
|
-
static flags: {
|
|
6
|
-
branch: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
-
"skip-commit": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
-
};
|
|
9
|
-
static args: {
|
|
10
|
-
resource_path: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
|
|
11
|
-
};
|
|
12
|
-
run(): Promise<void>;
|
|
13
|
-
private createTasks;
|
|
14
|
-
private getResourceIdsToPush;
|
|
15
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getWarningsForApplicationMigration = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const colorette_1 = require("colorette");
|
|
6
|
-
const semver_1 = tslib_1.__importDefault(require("semver"));
|
|
7
|
-
// If you are changing how application files work on disk, for example changing the directory layout,
|
|
8
|
-
// you need to tell the user how to upgrade manually.
|
|
9
|
-
const BREAKING_APPLICATION_VERSIONS = [
|
|
10
|
-
{
|
|
11
|
-
version: "0.0.20",
|
|
12
|
-
// This is an example message because 0.0.20 does not have a docs page for any migrations. This will be added
|
|
13
|
-
// in a future release
|
|
14
|
-
message: `${(0, colorette_1.red)("Warning")}: Your code must be updated due to a breaking change in custom component definitions. See docs.`,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
version: "0.0.21",
|
|
18
|
-
// This is an example message because 0.0.21 does not have a docs page for any migrations. This will be added
|
|
19
|
-
// in a future release
|
|
20
|
-
message: `${(0, colorette_1.red)("Error")}: This version of the CLI is incompatible with any Custom Components you've previously used,
|
|
21
|
-
due to breaking changes introduced in the config.ts format and Custom Components React API.
|
|
22
|
-
|
|
23
|
-
${(0, colorette_1.bold)("Your existing components are safe.")}
|
|
24
|
-
|
|
25
|
-
To manually migrate:
|
|
26
|
-
|
|
27
|
-
1. Rename "eventHandlers" to "events".
|
|
28
|
-
2. Update your properties to use the new format: ${(0, colorette_1.magenta)("https://docs.superblocks.com/applications/custom-components/development-lifecycle#configts")}
|
|
29
|
-
`,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
version: "0.0.23",
|
|
33
|
-
message: `${(0, colorette_1.red)("Warning")}: Type definitions for custom components have changed to include null values,
|
|
34
|
-
which were missing from previous types. The previous types were not accurate.
|
|
35
|
-
Superblocks represents missing/undefined properties as null.
|
|
36
|
-
|
|
37
|
-
To manually update, you should follow Typescript errors in your IDE and update your code
|
|
38
|
-
to handle null values.
|
|
39
|
-
|
|
40
|
-
${(0, colorette_1.bold)("Your existing components are safe.")}
|
|
41
|
-
|
|
42
|
-
See changelog: ${(0, colorette_1.magenta)("https://github.com/superblocksteam/superblocks-cli/blob/main/CHANGELOG.md")}
|
|
43
|
-
`,
|
|
44
|
-
},
|
|
45
|
-
];
|
|
46
|
-
function getWarningsForApplicationMigration(previousVersion, newVersion) {
|
|
47
|
-
const firstBreakingChange = BREAKING_APPLICATION_VERSIONS.find(({ version }) => {
|
|
48
|
-
return (semver_1.default.lt(previousVersion, version) && semver_1.default.lte(version, newVersion));
|
|
49
|
-
});
|
|
50
|
-
return firstBreakingChange === null || firstBreakingChange === void 0 ? void 0 : firstBreakingChange.message;
|
|
51
|
-
}
|
|
52
|
-
exports.getWarningsForApplicationMigration = getWarningsForApplicationMigration;
|
|
File without changes
|
|
File without changes
|
/package/dist/common/defaults/{create-component-defaults.d.ts → create-component-defaults.d.mts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/util/{migrationWarningsForApplications.d.ts → migrationWarningsForApplications.d.mts}
RENAMED
|
File without changes
|
|
File without changes
|