@slicemachine/init 2.8.2-dev-next-release.4 → 2.8.2-dev-next-release.5

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.
Files changed (104) hide show
  1. package/dist/SliceMachineInitProcess.cjs +13 -56
  2. package/dist/SliceMachineInitProcess.cjs.map +1 -1
  3. package/dist/SliceMachineInitProcess.js +13 -56
  4. package/dist/SliceMachineInitProcess.js.map +1 -1
  5. package/dist/_node_modules/@babel/code-frame/lib/index.cjs +2 -2
  6. package/dist/_node_modules/@babel/code-frame/lib/index.js +2 -2
  7. package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.cjs +1 -1
  8. package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.js +1 -1
  9. package/dist/_node_modules/@babel/highlight/lib/index.cjs +3 -3
  10. package/dist/_node_modules/@babel/highlight/lib/index.js +3 -3
  11. package/dist/_node_modules/@nodelib/fs.scandir/out/providers/async.cjs +1 -1
  12. package/dist/_node_modules/@nodelib/fs.scandir/out/providers/async.js +1 -1
  13. package/dist/_node_modules/@nodelib/fs.scandir/out/providers/sync.cjs +1 -1
  14. package/dist/_node_modules/@nodelib/fs.scandir/out/providers/sync.js +1 -1
  15. package/dist/_node_modules/@nodelib/fs.scandir/out/settings.cjs +1 -1
  16. package/dist/_node_modules/@nodelib/fs.scandir/out/settings.js +1 -1
  17. package/dist/_node_modules/@nodelib/fs.stat/out/index.cjs +1 -1
  18. package/dist/_node_modules/@nodelib/fs.stat/out/index.js +1 -1
  19. package/dist/_node_modules/@nodelib/fs.walk/out/index.cjs +1 -1
  20. package/dist/_node_modules/@nodelib/fs.walk/out/index.js +1 -1
  21. package/dist/_node_modules/cross-spawn/index.cjs +1 -1
  22. package/dist/_node_modules/cross-spawn/index.js +1 -1
  23. package/dist/_node_modules/dir-glob/index.cjs +2 -2
  24. package/dist/_node_modules/dir-glob/index.js +2 -2
  25. package/dist/_node_modules/fast-glob/out/index.cjs +1 -1
  26. package/dist/_node_modules/fast-glob/out/index.js +1 -1
  27. package/dist/_node_modules/fast-glob/out/managers/tasks.cjs +1 -1
  28. package/dist/_node_modules/fast-glob/out/managers/tasks.js +1 -1
  29. package/dist/_node_modules/fast-glob/out/providers/filters/deep.cjs +1 -1
  30. package/dist/_node_modules/fast-glob/out/providers/filters/deep.js +1 -1
  31. package/dist/_node_modules/fast-glob/out/providers/filters/entry.cjs +1 -1
  32. package/dist/_node_modules/fast-glob/out/providers/filters/entry.js +1 -1
  33. package/dist/_node_modules/fast-glob/out/providers/filters/error.cjs +1 -1
  34. package/dist/_node_modules/fast-glob/out/providers/filters/error.js +1 -1
  35. package/dist/_node_modules/fast-glob/out/providers/matchers/matcher.cjs +1 -1
  36. package/dist/_node_modules/fast-glob/out/providers/matchers/matcher.js +1 -1
  37. package/dist/_node_modules/fast-glob/out/providers/transformers/entry.cjs +1 -1
  38. package/dist/_node_modules/fast-glob/out/providers/transformers/entry.js +1 -1
  39. package/dist/_node_modules/fast-glob/out/readers/async.cjs +1 -1
  40. package/dist/_node_modules/fast-glob/out/readers/async.js +1 -1
  41. package/dist/_node_modules/fast-glob/out/readers/reader.cjs +2 -2
  42. package/dist/_node_modules/fast-glob/out/readers/reader.js +2 -2
  43. package/dist/_node_modules/fast-glob/out/readers/stream.cjs +2 -2
  44. package/dist/_node_modules/fast-glob/out/readers/stream.js +2 -2
  45. package/dist/_node_modules/fast-glob/out/readers/sync.cjs +2 -2
  46. package/dist/_node_modules/fast-glob/out/readers/sync.js +2 -2
  47. package/dist/_node_modules/fast-glob/out/utils/index.cjs +1 -1
  48. package/dist/_node_modules/fast-glob/out/utils/index.js +1 -1
  49. package/dist/_node_modules/get-stream/index.cjs +1 -1
  50. package/dist/_node_modules/get-stream/index.js +1 -1
  51. package/dist/_node_modules/hosted-git-info/index.cjs +1 -1
  52. package/dist/_node_modules/hosted-git-info/index.js +1 -1
  53. package/dist/_node_modules/js-tokens/index.cjs +1 -1
  54. package/dist/_node_modules/js-tokens/index.js +1 -1
  55. package/dist/_node_modules/lines-and-columns/build/index.cjs +1 -1
  56. package/dist/_node_modules/lines-and-columns/build/index.js +1 -1
  57. package/dist/_node_modules/map-obj/index.cjs +1 -1
  58. package/dist/_node_modules/map-obj/index.js +1 -1
  59. package/dist/_node_modules/meow/_node_modules/normalize-package-data/_node_modules/hosted-git-info/lib/index.cjs +1 -1
  60. package/dist/_node_modules/meow/_node_modules/normalize-package-data/_node_modules/hosted-git-info/lib/index.js +1 -1
  61. package/dist/_node_modules/parse-json/index.cjs +2 -2
  62. package/dist/_node_modules/parse-json/index.js +2 -2
  63. package/dist/_node_modules/path-key/index.cjs +1 -1
  64. package/dist/_node_modules/path-key/index.js +1 -1
  65. package/dist/_node_modules/path-type/index.cjs +1 -1
  66. package/dist/_node_modules/path-type/index.js +1 -1
  67. package/dist/_node_modules/signal-exit/index.cjs +1 -1
  68. package/dist/_node_modules/signal-exit/index.js +1 -1
  69. package/dist/_virtual/index10.cjs +2 -2
  70. package/dist/_virtual/index10.js +2 -2
  71. package/dist/_virtual/index11.cjs +2 -2
  72. package/dist/_virtual/index11.js +2 -2
  73. package/dist/_virtual/index12.cjs +2 -2
  74. package/dist/_virtual/index12.js +2 -2
  75. package/dist/_virtual/index13.cjs +2 -2
  76. package/dist/_virtual/index13.js +2 -2
  77. package/dist/_virtual/index15.cjs +2 -2
  78. package/dist/_virtual/index15.js +2 -2
  79. package/dist/_virtual/index16.cjs +2 -2
  80. package/dist/_virtual/index16.js +2 -2
  81. package/dist/_virtual/index17.cjs +2 -2
  82. package/dist/_virtual/index17.js +2 -2
  83. package/dist/_virtual/index18.cjs +2 -2
  84. package/dist/_virtual/index18.js +2 -2
  85. package/dist/_virtual/index19.cjs +2 -2
  86. package/dist/_virtual/index19.js +2 -2
  87. package/dist/_virtual/index3.cjs +2 -2
  88. package/dist/_virtual/index3.js +2 -2
  89. package/dist/_virtual/index4.cjs +2 -2
  90. package/dist/_virtual/index4.js +2 -2
  91. package/dist/_virtual/index5.cjs +2 -2
  92. package/dist/_virtual/index5.js +2 -2
  93. package/dist/_virtual/index6.cjs +2 -2
  94. package/dist/_virtual/index6.js +2 -2
  95. package/dist/_virtual/index7.cjs +2 -2
  96. package/dist/_virtual/index7.js +2 -2
  97. package/dist/_virtual/index8.cjs +2 -2
  98. package/dist/_virtual/index8.js +2 -2
  99. package/dist/_virtual/index9.cjs +2 -2
  100. package/dist/_virtual/index9.js +2 -2
  101. package/dist/packages/init/package.json.cjs +4 -4
  102. package/dist/packages/init/package.json.js +4 -4
  103. package/package.json +4 -4
  104. package/src/SliceMachineInitProcess.ts +18 -86
@@ -1,5 +1,5 @@
1
- var mapObj = { exports: {} };
1
+ var pathType = {};
2
2
  export {
3
- mapObj as __module
3
+ pathType as __exports
4
4
  };
5
5
  //# sourceMappingURL=index7.js.map
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var signalExit = { exports: {} };
4
- exports.__module = signalExit;
3
+ var build = {};
4
+ exports.__exports = build;
5
5
  //# sourceMappingURL=index8.cjs.map
@@ -1,5 +1,5 @@
1
- var signalExit = { exports: {} };
1
+ var build = {};
2
2
  export {
3
- signalExit as __module
3
+ build as __exports
4
4
  };
5
5
  //# sourceMappingURL=index8.js.map
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var getStream = { exports: {} };
4
- exports.__module = getStream;
3
+ var lib = {};
4
+ exports.__exports = lib;
5
5
  //# sourceMappingURL=index9.cjs.map
@@ -1,5 +1,5 @@
1
- var getStream = { exports: {} };
1
+ var lib = {};
2
2
  export {
3
- getStream as __module
3
+ lib as __exports
4
4
  };
5
5
  //# sourceMappingURL=index9.js.map
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const name = "@slicemachine/init";
4
- const version = "2.8.2-dev-next-release.4";
4
+ const version = "2.8.2-dev-next-release.5";
5
5
  const description = "Init Prismic Slice Machine in your project";
6
6
  const keywords = [
7
7
  "typescript",
@@ -55,7 +55,7 @@ const dependencies = {
55
55
  "@antfu/ni": "^0.20.0",
56
56
  "@lihbr/listr-update-renderer": "^0.5.3",
57
57
  "@sentry/node": "^7.70.0",
58
- "@slicemachine/manager": "^0.15.1-dev-next-release.4",
58
+ "@slicemachine/manager": "^0.15.1-dev-next-release.5",
59
59
  chalk: "^4.1.2",
60
60
  giget: "^1.1.2",
61
61
  globby: "^13.1.3",
@@ -68,7 +68,7 @@ const dependencies = {
68
68
  };
69
69
  const devDependencies = {
70
70
  "@size-limit/preset-small-lib": "8.2.4",
71
- "@slicemachine/plugin-kit": "0.4.22-dev-next-release.4",
71
+ "@slicemachine/plugin-kit": "0.4.22-dev-next-release.5",
72
72
  "@types/listr": "0.14.4",
73
73
  "@types/prompts": "2.4.3",
74
74
  "@types/semver": "7.3.13",
@@ -94,7 +94,7 @@ const devDependencies = {
94
94
  "vite-plugin-sdk": "0.1.1",
95
95
  vitest: "0.32.0"
96
96
  };
97
- const gitHead = "1444d3484bf7babe488259c26847aceb44a6b42a";
97
+ const gitHead = "94bdad34ffb639b584d6032a493c77a707649d2c";
98
98
  const pkg = {
99
99
  name,
100
100
  version,
@@ -1,5 +1,5 @@
1
1
  const name = "@slicemachine/init";
2
- const version = "2.8.2-dev-next-release.4";
2
+ const version = "2.8.2-dev-next-release.5";
3
3
  const description = "Init Prismic Slice Machine in your project";
4
4
  const keywords = [
5
5
  "typescript",
@@ -53,7 +53,7 @@ const dependencies = {
53
53
  "@antfu/ni": "^0.20.0",
54
54
  "@lihbr/listr-update-renderer": "^0.5.3",
55
55
  "@sentry/node": "^7.70.0",
56
- "@slicemachine/manager": "^0.15.1-dev-next-release.4",
56
+ "@slicemachine/manager": "^0.15.1-dev-next-release.5",
57
57
  chalk: "^4.1.2",
58
58
  giget: "^1.1.2",
59
59
  globby: "^13.1.3",
@@ -66,7 +66,7 @@ const dependencies = {
66
66
  };
67
67
  const devDependencies = {
68
68
  "@size-limit/preset-small-lib": "8.2.4",
69
- "@slicemachine/plugin-kit": "0.4.22-dev-next-release.4",
69
+ "@slicemachine/plugin-kit": "0.4.22-dev-next-release.5",
70
70
  "@types/listr": "0.14.4",
71
71
  "@types/prompts": "2.4.3",
72
72
  "@types/semver": "7.3.13",
@@ -92,7 +92,7 @@ const devDependencies = {
92
92
  "vite-plugin-sdk": "0.1.1",
93
93
  vitest: "0.32.0"
94
94
  };
95
- const gitHead = "1444d3484bf7babe488259c26847aceb44a6b42a";
95
+ const gitHead = "94bdad34ffb639b584d6032a493c77a707649d2c";
96
96
  const pkg = {
97
97
  name,
98
98
  version,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slicemachine/init",
3
- "version": "2.8.2-dev-next-release.4",
3
+ "version": "2.8.2-dev-next-release.5",
4
4
  "description": "Init Prismic Slice Machine in your project",
5
5
  "keywords": [
6
6
  "typescript",
@@ -54,7 +54,7 @@
54
54
  "@antfu/ni": "^0.20.0",
55
55
  "@lihbr/listr-update-renderer": "^0.5.3",
56
56
  "@sentry/node": "^7.70.0",
57
- "@slicemachine/manager": "^0.15.1-dev-next-release.4",
57
+ "@slicemachine/manager": "^0.15.1-dev-next-release.5",
58
58
  "chalk": "^4.1.2",
59
59
  "giget": "^1.1.2",
60
60
  "globby": "^13.1.3",
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "devDependencies": {
69
69
  "@size-limit/preset-small-lib": "8.2.4",
70
- "@slicemachine/plugin-kit": "0.4.22-dev-next-release.4",
70
+ "@slicemachine/plugin-kit": "0.4.22-dev-next-release.5",
71
71
  "@types/listr": "0.14.4",
72
72
  "@types/prompts": "2.4.3",
73
73
  "@types/semver": "7.3.13",
@@ -93,5 +93,5 @@
93
93
  "vite-plugin-sdk": "0.1.1",
94
94
  "vitest": "0.32.0"
95
95
  },
96
- "gitHead": "1444d3484bf7babe488259c26847aceb44a6b42a"
96
+ "gitHead": "94bdad34ffb639b584d6032a493c77a707649d2c"
97
97
  }
@@ -198,106 +198,38 @@ export class SliceMachineInitProcess {
198
198
  console.log(
199
199
  `\n${chalk.bgGreen(` ${chalk.bold.white("Slice Machine")} `)} ${chalk.dim(
200
200
  "→",
201
- )} Initialization successful!`,
201
+ )} Initialization successful!
202
+
203
+ Continue with next steps in Slice Machine.
204
+ `,
202
205
  );
203
206
 
204
207
  try {
205
- const runSmCommand = this.context.projectInitialization?.patchedScript
206
- ? await getRunScriptCommand({
207
- agent: this.context.packageManager || "npm",
208
- script: "slicemachine",
209
- })
210
- : await getExecuteCommand({
211
- agent: this.context.packageManager || "npm",
212
- script: "start-slicemachine",
213
- });
214
-
215
- const runProjectCommand = await getRunScriptCommand({
216
- agent: this.context.packageManager || "npm",
217
- script: "dev",
218
- });
219
-
220
- const apiEndpoints = this.manager.getAPIEndpoints();
221
- const wroomHost = new URL(apiEndpoints.PrismicWroom).host;
222
-
223
- const dashboardURL = new URL(
224
- `https://${this.context.repository.domain}.${wroomHost}`,
225
- )
226
- .toString()
227
- .replace(/\/$/, "");
228
- const apiURL = new URL(
229
- "./api/v2",
230
- `https://${this.context.repository.domain}.cdn.${wroomHost}`,
231
- ).toString();
232
-
233
- // We prefer to manually allow console logs despite the app being a CLI to catch wild/unwanted console logs better
234
- // eslint-disable-next-line no-console
235
- console.log(`
236
- YOUR REPOSITORY
237
- Page Builder ${chalk.cyan(dashboardURL)}
238
- API ${chalk.cyan(apiURL)}
239
-
240
- RESOURCES
241
- Documentation ${chalk.cyan(
242
- this.context.framework.prismicDocumentation,
243
- )}
244
- Getting help ${chalk.cyan("https://community.prismic.io")}
245
-
246
- GETTING STARTED
247
- Run Slice Machine ${chalk.cyan(runSmCommand)}
248
- Run your project ${chalk.cyan(runProjectCommand)}
249
- `);
250
-
251
- if (this.options.starter && this.options.repository) {
252
- const { openDashboard } = await prompt<boolean, "openDashboard">({
253
- type: "confirm",
254
- name: "openDashboard",
255
- message: "Would you like to open your repository?",
256
- initial: true,
257
- });
208
+ if (this.options.startSlicemachine) {
209
+ const runSmCommand = this.context.projectInitialization?.patchedScript
210
+ ? await getRunScriptCommand({
211
+ agent: this.context.packageManager || "npm",
212
+ script: "slicemachine",
213
+ })
214
+ : await getExecuteCommand({
215
+ agent: this.context.packageManager || "npm",
216
+ script: "start-slicemachine",
217
+ });
258
218
 
259
- if (openDashboard) {
260
- open(dashboardURL);
261
- }
262
- } else if (this.options.startSlicemachine) {
263
- const pkgJSONPath = path.join(this.manager.cwd, "package.json");
264
- const pkg = JSON.parse(await fs.readFile(pkgJSONPath, "utf-8"));
265
- const scripts = pkg.scripts || {};
266
-
267
- const finalSmCommand = (() => {
268
- if (
269
- scripts["dev"] &&
270
- typeof scripts["dev"] === "string" &&
271
- scripts["dev"].includes(":slicemachine")
272
- ) {
273
- return {
274
- command: runProjectCommand,
275
- message: `Would you like to run your project and Slice Machine concurrently (${runProjectCommand})?`,
276
- };
277
- }
278
-
279
- return {
280
- command: runSmCommand,
281
- message: `Would you like to run Slice Machine (${runSmCommand})?`,
282
- };
283
- })();
284
219
  const { startSlicemachine } = await prompt<
285
220
  boolean,
286
221
  "startSlicemachine"
287
222
  >({
288
223
  type: "confirm",
289
224
  name: "startSlicemachine",
290
- message: finalSmCommand.message,
225
+ message: `Run Slice Machine (${chalk.cyan(runSmCommand)})?`,
291
226
  initial: true,
292
227
  });
293
228
 
294
229
  if (startSlicemachine) {
295
- const commandReturnValue = await execaCommand(
296
- finalSmCommand.command,
297
- {
298
- env: { FORCE_COLOR: "true" },
299
- },
300
- ).pipeStdout?.(process.stdout);
230
+ const commandReturnValue = await execaCommand(runSmCommand, {
231
+ env: { FORCE_COLOR: "true" },
232
+ }).pipeStdout?.(process.stdout);
301
233
  if (commandReturnValue !== undefined) {
302
234
  // eslint-disable-next-line no-console
303
235
  console.log(commandReturnValue.stdout);