@superblocksteam/cli 1.9.3 → 1.12.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/assets/injectedReactShim17.jsx +15 -0
- package/assets/injectedReactShim18.jsx +16 -0
- package/assets/injectedReactShimShared.jsx +140 -0
- package/bin/dev +5 -7
- package/bin/run +1 -3
- package/dist/appendHotReloadEventPlugin.d.mts +2 -0
- 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} +63 -65
- 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} +38 -46
- package/dist/commands/pull.d.mts +17 -0
- package/dist/commands/{pull.js → pull.mjs} +74 -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} +13 -6
- package/dist/common/version-control.mjs +1064 -0
- package/dist/index.js +1 -5
- package/dist/productionCssPlugin.d.mts +2 -0
- package/dist/productionCssPlugin.mjs +50 -0
- package/dist/reactShimPlugin.d.mts +2 -0
- package/dist/reactShimPlugin.mjs +127 -0
- package/dist/util/migrationWarningsForApplications.mjs +47 -0
- package/dist/util/{migrationsForDotfiles.js → migrationsForDotfiles.mjs} +10 -17
- package/oclif.manifest.json +274 -161
- package/package.json +45 -45
- 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/common/version-control.js +0 -716
- package/dist/util/migrationWarningsForApplications.js +0 -52
- /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/util/{migrationWarningsForApplications.d.ts → migrationWarningsForApplications.d.mts} +0 -0
- /package/dist/util/{migrationsForDotfiles.d.ts → migrationsForDotfiles.d.mts} +0 -0
|
@@ -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
|
/package/dist/common/defaults/{create-component-defaults.d.ts → create-component-defaults.d.mts}
RENAMED
|
File without changes
|
/package/dist/util/{migrationWarningsForApplications.d.ts → migrationWarningsForApplications.d.mts}
RENAMED
|
File without changes
|
|
File without changes
|