@slicemachine/init 2.9.9 → 2.9.10-alpha.dev-new-release-process.2
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/dist/SliceMachineInitProcess.cjs +4 -1
- package/dist/SliceMachineInitProcess.cjs.map +1 -1
- package/dist/SliceMachineInitProcess.js +4 -1
- package/dist/SliceMachineInitProcess.js.map +1 -1
- package/dist/_node_modules/execa/_node_modules/get-stream/buffer-stream.cjs.map +1 -0
- package/dist/_node_modules/execa/_node_modules/get-stream/buffer-stream.js.map +1 -0
- package/dist/_node_modules/{get-stream → execa/_node_modules/get-stream}/index.cjs +2 -2
- package/dist/_node_modules/execa/_node_modules/get-stream/index.cjs.map +1 -0
- package/dist/_node_modules/{get-stream → execa/_node_modules/get-stream}/index.js +2 -2
- package/dist/_node_modules/execa/_node_modules/get-stream/index.js.map +1 -0
- package/dist/_node_modules/execa/lib/stream.cjs +1 -1
- package/dist/_node_modules/execa/lib/stream.js +1 -1
- package/dist/_node_modules/{glob-parent → fast-glob/_node_modules/glob-parent}/index.cjs +1 -1
- package/dist/_node_modules/fast-glob/_node_modules/glob-parent/index.cjs.map +1 -0
- package/dist/_node_modules/{glob-parent → fast-glob/_node_modules/glob-parent}/index.js +1 -1
- package/dist/_node_modules/fast-glob/_node_modules/glob-parent/index.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/pattern.cjs +1 -1
- package/dist/_node_modules/fast-glob/out/utils/pattern.js +1 -1
- package/dist/_node_modules/json-parse-even-better-errors/index.cjs.map +1 -0
- package/dist/_node_modules/json-parse-even-better-errors/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/decamelize-keys/_node_modules/decamelize/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/decamelize-keys/_node_modules/decamelize/index.js.map +1 -0
- package/dist/_node_modules/{decamelize-keys → meow/_node_modules/decamelize-keys}/index.cjs +2 -2
- package/dist/_node_modules/meow/_node_modules/decamelize-keys/index.cjs.map +1 -0
- package/dist/_node_modules/{decamelize-keys → meow/_node_modules/decamelize-keys}/index.js +2 -2
- package/dist/_node_modules/meow/_node_modules/decamelize-keys/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/_node_modules/lru-cache/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/_node_modules/lru-cache/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/git-host-info.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/git-host-info.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/git-host.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/git-host.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/{normalize-package-data/_node_modules/hosted-git-info → hosted-git-info}/lib/index.cjs +2 -2
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/{normalize-package-data/_node_modules/hosted-git-info → hosted-git-info}/lib/index.js +2 -2
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/parse-url.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/parse-url.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/map-obj/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/map-obj/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/fixer.cjs +1 -1
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/fixer.js +1 -1
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host-info.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host-info.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host.js.map +1 -0
- package/dist/_node_modules/{hosted-git-info → meow/_node_modules/read-pkg/_node_modules/hosted-git-info}/index.cjs +2 -2
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/index.cjs.map +1 -0
- package/dist/_node_modules/{hosted-git-info → meow/_node_modules/read-pkg/_node_modules/hosted-git-info}/index.js +2 -2
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.cjs +1 -1
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.js +1 -1
- package/dist/_node_modules/meow/index.cjs +2 -2
- package/dist/_node_modules/meow/index.js +2 -2
- package/dist/_node_modules/minimist-options/_node_modules/arrify/index.cjs.map +1 -0
- package/dist/_node_modules/minimist-options/_node_modules/arrify/index.js.map +1 -0
- package/dist/_node_modules/minimist-options/index.cjs +1 -1
- package/dist/_node_modules/minimist-options/index.js +1 -1
- package/dist/_node_modules/parse-json/index.cjs +1 -1
- package/dist/_node_modules/parse-json/index.js +1 -1
- package/dist/_node_modules/redent/_node_modules/indent-string/index.cjs.map +1 -0
- package/dist/_node_modules/redent/_node_modules/indent-string/index.js.map +1 -0
- package/dist/_node_modules/redent/_node_modules/strip-indent/index.cjs.map +1 -0
- package/dist/_node_modules/redent/_node_modules/strip-indent/index.js.map +1 -0
- package/dist/_node_modules/{meow/_node_modules/redent → redent}/index.cjs +2 -2
- package/dist/_node_modules/redent/index.cjs.map +1 -0
- package/dist/_node_modules/{meow/_node_modules/redent → redent}/index.js +2 -2
- package/dist/_node_modules/redent/index.js.map +1 -0
- package/dist/_node_modules/signal-exit/index.cjs +1 -1
- package/dist/_node_modules/signal-exit/index.js +1 -1
- package/dist/_virtual/index15.cjs +2 -2
- package/dist/_virtual/index15.js +2 -2
- package/dist/_virtual/index16.cjs +2 -2
- package/dist/_virtual/index16.js +2 -2
- package/dist/lib/framework.cjs +15 -8
- package/dist/lib/framework.cjs.map +1 -1
- package/dist/lib/framework.js +15 -8
- package/dist/lib/framework.js.map +1 -1
- package/dist/lib/setupSentry.cjs +4 -4
- package/dist/lib/setupSentry.cjs.map +1 -1
- package/dist/lib/setupSentry.js +5 -5
- package/dist/lib/setupSentry.js.map +1 -1
- package/dist/packages/init/package.json.cjs +12 -7
- package/dist/packages/init/package.json.cjs.map +1 -1
- package/dist/packages/init/package.json.js +12 -7
- package/dist/packages/init/package.json.js.map +1 -1
- package/package.json +100 -97
- package/src/SliceMachineInitProcess.ts +7 -1
- package/src/lib/framework.ts +19 -9
- package/src/lib/setupSentry.ts +5 -8
- package/LICENSE +0 -202
- package/dist/_node_modules/arrify/index.cjs.map +0 -1
- package/dist/_node_modules/arrify/index.js.map +0 -1
- package/dist/_node_modules/decamelize-keys/_node_modules/decamelize/index.cjs.map +0 -1
- package/dist/_node_modules/decamelize-keys/_node_modules/decamelize/index.js.map +0 -1
- package/dist/_node_modules/decamelize-keys/_node_modules/map-obj/index.cjs.map +0 -1
- package/dist/_node_modules/decamelize-keys/_node_modules/map-obj/index.js.map +0 -1
- package/dist/_node_modules/decamelize-keys/index.cjs.map +0 -1
- package/dist/_node_modules/decamelize-keys/index.js.map +0 -1
- package/dist/_node_modules/get-stream/buffer-stream.cjs.map +0 -1
- package/dist/_node_modules/get-stream/buffer-stream.js.map +0 -1
- package/dist/_node_modules/get-stream/index.cjs.map +0 -1
- package/dist/_node_modules/get-stream/index.js.map +0 -1
- package/dist/_node_modules/glob-parent/index.cjs.map +0 -1
- package/dist/_node_modules/glob-parent/index.js.map +0 -1
- package/dist/_node_modules/hosted-git-info/git-host-info.cjs.map +0 -1
- package/dist/_node_modules/hosted-git-info/git-host-info.js.map +0 -1
- package/dist/_node_modules/hosted-git-info/git-host.cjs.map +0 -1
- package/dist/_node_modules/hosted-git-info/git-host.js.map +0 -1
- package/dist/_node_modules/hosted-git-info/index.cjs.map +0 -1
- package/dist/_node_modules/hosted-git-info/index.js.map +0 -1
- package/dist/_node_modules/meow/_node_modules/indent-string/index.cjs.map +0 -1
- package/dist/_node_modules/meow/_node_modules/indent-string/index.js.map +0 -1
- package/dist/_node_modules/meow/_node_modules/lru-cache/index.cjs.map +0 -1
- package/dist/_node_modules/meow/_node_modules/lru-cache/index.js.map +0 -1
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/_node_modules/hosted-git-info/lib/git-host-info.cjs.map +0 -1
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/_node_modules/hosted-git-info/lib/git-host-info.js.map +0 -1
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/_node_modules/hosted-git-info/lib/git-host.cjs.map +0 -1
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/_node_modules/hosted-git-info/lib/git-host.js.map +0 -1
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/_node_modules/hosted-git-info/lib/index.cjs.map +0 -1
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/_node_modules/hosted-git-info/lib/index.js.map +0 -1
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/_node_modules/hosted-git-info/lib/parse-url.cjs.map +0 -1
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/_node_modules/hosted-git-info/lib/parse-url.js.map +0 -1
- package/dist/_node_modules/meow/_node_modules/redent/index.cjs.map +0 -1
- package/dist/_node_modules/meow/_node_modules/redent/index.js.map +0 -1
- package/dist/_node_modules/meow/_node_modules/strip-indent/index.cjs.map +0 -1
- package/dist/_node_modules/meow/_node_modules/strip-indent/index.js.map +0 -1
- package/dist/_node_modules/parse-json/_node_modules/json-parse-even-better-errors/index.cjs.map +0 -1
- package/dist/_node_modules/parse-json/_node_modules/json-parse-even-better-errors/index.js.map +0 -1
- /package/dist/_node_modules/{get-stream → execa/_node_modules/get-stream}/buffer-stream.cjs +0 -0
- /package/dist/_node_modules/{get-stream → execa/_node_modules/get-stream}/buffer-stream.js +0 -0
- /package/dist/_node_modules/{parse-json/_node_modules/json-parse-even-better-errors → json-parse-even-better-errors}/index.cjs +0 -0
- /package/dist/_node_modules/{parse-json/_node_modules/json-parse-even-better-errors → json-parse-even-better-errors}/index.js +0 -0
- /package/dist/_node_modules/{decamelize-keys → meow/_node_modules/decamelize-keys}/_node_modules/decamelize/index.cjs +0 -0
- /package/dist/_node_modules/{decamelize-keys → meow/_node_modules/decamelize-keys}/_node_modules/decamelize/index.js +0 -0
- /package/dist/_node_modules/meow/_node_modules/{lru-cache → hosted-git-info/_node_modules/lru-cache}/index.cjs +0 -0
- /package/dist/_node_modules/meow/_node_modules/{lru-cache → hosted-git-info/_node_modules/lru-cache}/index.js +0 -0
- /package/dist/_node_modules/meow/_node_modules/{normalize-package-data/_node_modules/hosted-git-info → hosted-git-info}/lib/git-host-info.cjs +0 -0
- /package/dist/_node_modules/meow/_node_modules/{normalize-package-data/_node_modules/hosted-git-info → hosted-git-info}/lib/git-host-info.js +0 -0
- /package/dist/_node_modules/meow/_node_modules/{normalize-package-data/_node_modules/hosted-git-info → hosted-git-info}/lib/git-host.cjs +0 -0
- /package/dist/_node_modules/meow/_node_modules/{normalize-package-data/_node_modules/hosted-git-info → hosted-git-info}/lib/git-host.js +0 -0
- /package/dist/_node_modules/meow/_node_modules/{normalize-package-data/_node_modules/hosted-git-info → hosted-git-info}/lib/parse-url.cjs +0 -0
- /package/dist/_node_modules/meow/_node_modules/{normalize-package-data/_node_modules/hosted-git-info → hosted-git-info}/lib/parse-url.js +0 -0
- /package/dist/_node_modules/{decamelize-keys → meow}/_node_modules/map-obj/index.cjs +0 -0
- /package/dist/_node_modules/{decamelize-keys → meow}/_node_modules/map-obj/index.js +0 -0
- /package/dist/_node_modules/{hosted-git-info → meow/_node_modules/read-pkg/_node_modules/hosted-git-info}/git-host-info.cjs +0 -0
- /package/dist/_node_modules/{hosted-git-info → meow/_node_modules/read-pkg/_node_modules/hosted-git-info}/git-host-info.js +0 -0
- /package/dist/_node_modules/{hosted-git-info → meow/_node_modules/read-pkg/_node_modules/hosted-git-info}/git-host.cjs +0 -0
- /package/dist/_node_modules/{hosted-git-info → meow/_node_modules/read-pkg/_node_modules/hosted-git-info}/git-host.js +0 -0
- /package/dist/_node_modules/{arrify → minimist-options/_node_modules/arrify}/index.cjs +0 -0
- /package/dist/_node_modules/{arrify → minimist-options/_node_modules/arrify}/index.js +0 -0
- /package/dist/_node_modules/{meow → redent}/_node_modules/indent-string/index.cjs +0 -0
- /package/dist/_node_modules/{meow → redent}/_node_modules/indent-string/index.js +0 -0
- /package/dist/_node_modules/{meow → redent}/_node_modules/strip-indent/index.cjs +0 -0
- /package/dist/_node_modules/{meow → redent}/_node_modules/strip-indent/index.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework.js","sources":["../../../src/lib/framework.ts"],"sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport semver from \"semver\";\n\nimport { FrameworkWroomTelemetryID } from \"@slicemachine/manager\";\n\nimport { version as pkgVersion } from \"../../package.json\";\n\nexport type Framework = {\n\t/**\n\t * Framework's human readable name.\n\t */\n\tname: string;\n\n\t/**\n\t * Framework 's id sent to Segment from Slice Machine\n\t */\n\tsliceMachineTelemetryID:\n\t\t| \"next\"\n\t\t| \"nuxt-2\"\n\t\t| \"nuxt-3\"\n\t\t| \"sveltekit-1\"\n\t\t| \"sveltekit-2\"\n\t\t| \"universal\";\n\n\t/**\n\t * Framework's id sent to Segment from wroom.\n\t */\n\twroomTelemetryID: FrameworkWroomTelemetryID;\n\n\t/**\n\t * A link to the Prismic documentation for the framework\n\t */\n\tprismicDocumentation: string;\n\n\t/**\n\t * Package name of the adapter responsible for this framework\n\t */\n\tadapterName: string;\n\n\t/**\n\t * A package name/semver range map defining framework compatibility\n\t * requirements.\n\t *\n\t * Project should match all entries to be considered compatible.\n\t */\n\tcompatibility: Record<string, string>;\n\n\t/**\n\t * A package name/semver range map defining development dependencies to be\n\t * installed. Typically Slice Machine and the framework's adapter.\n\t *\n\t * @remarks\n\t * Dependencies required to work with the framework (e.g. `@prismicio/next`\n\t * for Next.js) should not be defined here. Those are to be defined by the\n\t * adapter.\n\t */\n\tdevDependencies: Record<string, string>;\n};\n\nconst
|
|
1
|
+
{"version":3,"file":"framework.js","sources":["../../../src/lib/framework.ts"],"sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport semver from \"semver\";\n\nimport { FrameworkWroomTelemetryID } from \"@slicemachine/manager\";\n\nimport { version as pkgVersion } from \"../../package.json\";\n\nexport type Framework = {\n\t/**\n\t * Framework's human readable name.\n\t */\n\tname: string;\n\n\t/**\n\t * Framework 's id sent to Segment from Slice Machine\n\t */\n\tsliceMachineTelemetryID:\n\t\t| \"next\"\n\t\t| \"nuxt-2\"\n\t\t| \"nuxt-3\"\n\t\t| \"sveltekit-1\"\n\t\t| \"sveltekit-2\"\n\t\t| \"universal\";\n\n\t/**\n\t * Framework's id sent to Segment from wroom.\n\t */\n\twroomTelemetryID: FrameworkWroomTelemetryID;\n\n\t/**\n\t * A link to the Prismic documentation for the framework\n\t */\n\tprismicDocumentation: string;\n\n\t/**\n\t * Package name of the adapter responsible for this framework\n\t */\n\tadapterName: string;\n\n\t/**\n\t * A package name/semver range map defining framework compatibility\n\t * requirements.\n\t *\n\t * Project should match all entries to be considered compatible.\n\t */\n\tcompatibility: Record<string, string>;\n\n\t/**\n\t * A package name/semver range map defining development dependencies to be\n\t * installed. Typically Slice Machine and the framework's adapter.\n\t *\n\t * @remarks\n\t * Dependencies required to work with the framework (e.g. `@prismicio/next`\n\t * for Next.js) should not be defined here. Those are to be defined by the\n\t * adapter.\n\t */\n\tdevDependencies: Record<string, string>;\n};\n\nconst prereleaseComponents = semver.prerelease(pkgVersion);\nlet npmDistributionTag;\nif (\n\tprereleaseComponents !== null &&\n\tprereleaseComponents.length >= 2 &&\n\tprocess.env.NODE_ENV !== \"test\"\n) {\n\tconst prereleaseIdentifier = prereleaseComponents.slice(0, -1).join(\".\");\n\tnpmDistributionTag = prereleaseIdentifier;\n} else {\n\tnpmDistributionTag = \"latest\";\n}\n\nconst DEFAULT_DEV_DEPENDENCIES: Record<string, string> = {\n\t\"slice-machine-ui\": npmDistributionTag,\n};\n\n/**\n * Frameworks we support, orders shouldn't matter much but is respected (the\n * higher it is the more priority it has in case multiple matches)\n */\nexport const FRAMEWORKS: Record<string, Framework> = {\n\t\"nuxt-2\": {\n\t\tname: \"Nuxt 2\",\n\t\tsliceMachineTelemetryID: \"nuxt-2\",\n\t\twroomTelemetryID: \"nuxt\",\n\t\tprismicDocumentation: \"https://prismic.dev/init/nuxt-2\",\n\t\tadapterName: \"@slicemachine/adapter-nuxt2\",\n\t\tcompatibility: {\n\t\t\tnuxt: \"^2.0.0\",\n\t\t},\n\t\tdevDependencies: {\n\t\t\t...DEFAULT_DEV_DEPENDENCIES,\n\t\t\t\"@slicemachine/adapter-nuxt2\": npmDistributionTag,\n\t\t},\n\t},\n\t\"nuxt-3\": {\n\t\tname: \"Nuxt 3\",\n\t\tsliceMachineTelemetryID: \"nuxt-3\",\n\t\twroomTelemetryID: \"nuxt\",\n\t\tprismicDocumentation: \"https://prismic.dev/init/nuxt-3\",\n\t\tadapterName: \"@slicemachine/adapter-nuxt\",\n\t\tcompatibility: {\n\t\t\tnuxt: \"^3.0.0\",\n\t\t},\n\t\tdevDependencies: {\n\t\t\t...DEFAULT_DEV_DEPENDENCIES,\n\t\t\t\"@slicemachine/adapter-nuxt\": npmDistributionTag,\n\t\t},\n\t},\n\tnext: {\n\t\tname: \"Next.js\",\n\t\tsliceMachineTelemetryID: \"next\",\n\t\twroomTelemetryID: \"next\",\n\t\tprismicDocumentation: \"https://prismic.dev/init/next\",\n\t\tadapterName: \"@slicemachine/adapter-next\",\n\t\tcompatibility: {\n\t\t\tnext: \">=11.0.0\",\n\t\t},\n\t\tdevDependencies: {\n\t\t\t...DEFAULT_DEV_DEPENDENCIES,\n\t\t\t\"@slicemachine/adapter-next\": npmDistributionTag,\n\t\t},\n\t},\n\t\"sveltekit-1\": {\n\t\tname: \"SvelteKit\",\n\t\tsliceMachineTelemetryID: \"sveltekit-1\",\n\t\twroomTelemetryID: \"sveltekit\",\n\t\tprismicDocumentation: \"https://prismic.dev/init/sveltekit-1\",\n\t\tadapterName: \"@slicemachine/adapter-sveltekit\",\n\t\tcompatibility: {\n\t\t\t\"@sveltejs/kit\": \"^1.0.0\",\n\t\t},\n\t\tdevDependencies: {\n\t\t\t...DEFAULT_DEV_DEPENDENCIES,\n\t\t\t\"@slicemachine/adapter-sveltekit\": npmDistributionTag,\n\t\t},\n\t},\n\t\"sveltekit-2\": {\n\t\tname: \"SvelteKit\",\n\t\tsliceMachineTelemetryID: \"sveltekit-2\",\n\t\twroomTelemetryID: \"sveltekit\",\n\t\tprismicDocumentation: \"https://prismic.dev/init/sveltekit-2\",\n\t\tadapterName: \"@slicemachine/adapter-sveltekit\",\n\t\tcompatibility: {\n\t\t\t\"@sveltejs/kit\": \"^2.0.0\",\n\t\t},\n\t\tdevDependencies: {\n\t\t\t...DEFAULT_DEV_DEPENDENCIES,\n\t\t\t\"@slicemachine/adapter-sveltekit\": npmDistributionTag,\n\t\t},\n\t},\n} as const;\n\n/**\n * Universal package used when framework is not supported.\n */\nexport const UNIVERSAL: Framework = {\n\tname: \"universal (no framework)\",\n\tsliceMachineTelemetryID: \"universal\",\n\twroomTelemetryID: \"other\",\n\tprismicDocumentation: \"https://prismic.dev/init/universal\",\n\tadapterName: \"@slicemachine/adapter-universal\",\n\tcompatibility: {},\n\tdevDependencies: {\n\t\t...DEFAULT_DEV_DEPENDENCIES,\n\t\t\"@slicemachine/adapter-universal\": npmDistributionTag,\n\t},\n};\n\nexport const detectFramework = async (cwd: string): Promise<Framework> => {\n\tconst path = join(cwd, \"package.json\");\n\n\tlet allDependencies: Record<string, string>;\n\ttry {\n\t\tconst pkg = JSON.parse(await readFile(path, \"utf-8\"));\n\n\t\tallDependencies = {\n\t\t\t...pkg.dependencies,\n\t\t\t...pkg.devDependencies,\n\t\t};\n\t} catch (error) {\n\t\tthrow new Error(\n\t\t\t`Failed to read project's \\`package.json\\` at \\`${path}\\``,\n\t\t\t{ cause: error },\n\t\t);\n\t}\n\n\treturn (\n\t\tObject.values(FRAMEWORKS).find((framework) => {\n\t\t\treturn Object.entries(framework.compatibility).every(([pkg, range]) => {\n\t\t\t\tif (pkg in allDependencies) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Determine lowest version possibly in use\n\t\t\t\t\t\tconst minimumVersion = semver.minVersion(allDependencies[pkg]);\n\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\t\treturn semver.satisfies(minimumVersion!, range);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// We assume unconventional tags, `latest`, `beta`, `dev` matches the framework\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}) || UNIVERSAL\n\t);\n};\n"],"names":["pkgVersion"],"mappings":"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"}
|
package/dist/lib/setupSentry.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const Sentry = require("@sentry/node");
|
|
4
|
-
const
|
|
4
|
+
const manager = require("@slicemachine/manager");
|
|
5
5
|
const constants = require("../constants.cjs");
|
|
6
6
|
const checkIsSentryEnabled = require("./checkIsSentryEnabled.cjs");
|
|
7
7
|
const _package = require("../packages/init/package.json.cjs");
|
|
@@ -26,11 +26,11 @@ function setupSentry() {
|
|
|
26
26
|
if (!checkIsSentryEnabled.checkIsSentryEnabled()) {
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
-
const
|
|
29
|
+
const { environment, release } = manager.getEnvironmentInfo(_package);
|
|
30
30
|
Sentry__namespace.init({
|
|
31
31
|
dsn: constants.SENTRY_EXPRESS_DSN,
|
|
32
|
-
release
|
|
33
|
-
environment
|
|
32
|
+
release,
|
|
33
|
+
environment,
|
|
34
34
|
// Increase the default truncation length of 250 to 2500 (x10)
|
|
35
35
|
// to have enough details in Sentry
|
|
36
36
|
maxValueLength: 2500
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupSentry.cjs","sources":["../../../src/lib/setupSentry.ts"],"sourcesContent":["import * as Sentry from \"@sentry/node\";\nimport
|
|
1
|
+
{"version":3,"file":"setupSentry.cjs","sources":["../../../src/lib/setupSentry.ts"],"sourcesContent":["import * as Sentry from \"@sentry/node\";\nimport { getEnvironmentInfo } from \"@slicemachine/manager\";\n\nimport { SENTRY_EXPRESS_DSN } from \"../constants\";\nimport { checkIsSentryEnabled } from \"./checkIsSentryEnabled\";\nimport * as pkg from \"../../package.json\";\n\nexport function setupSentry(): void {\n\tif (!checkIsSentryEnabled()) {\n\t\treturn;\n\t}\n\n\tconst { environment, release } = getEnvironmentInfo(pkg);\n\n\tSentry.init({\n\t\tdsn: SENTRY_EXPRESS_DSN,\n\t\trelease,\n\t\tenvironment,\n\t\t// Increase the default truncation length of 250 to 2500 (x10)\n\t\t// to have enough details in Sentry\n\t\tmaxValueLength: 2_500,\n\t});\n}\n"],"names":["checkIsSentryEnabled","getEnvironmentInfo","pkg","Sentry","SENTRY_EXPRESS_DSN"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;SAOgB,cAAW;AACtB,MAAA,CAACA,6CAAwB;AAC5B;AAAA,EACA;AAED,QAAM,EAAE,aAAa,QAAO,IAAKC,2BAAmBC,QAAG;AAEvDC,oBAAO,KAAK;AAAA,IACX,KAAKC,UAAA;AAAA,IACL;AAAA,IACA;AAAA;AAAA;AAAA,IAGA,gBAAgB;AAAA,EAAA,CAChB;AACF;;"}
|
package/dist/lib/setupSentry.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as Sentry from "@sentry/node";
|
|
2
|
-
import
|
|
2
|
+
import { getEnvironmentInfo } from "@slicemachine/manager";
|
|
3
3
|
import { SENTRY_EXPRESS_DSN } from "../constants.js";
|
|
4
4
|
import { checkIsSentryEnabled } from "./checkIsSentryEnabled.js";
|
|
5
|
-
import
|
|
5
|
+
import * as _package from "../packages/init/package.json.js";
|
|
6
6
|
function setupSentry() {
|
|
7
7
|
if (!checkIsSentryEnabled()) {
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const { environment, release } = getEnvironmentInfo(_package);
|
|
11
11
|
Sentry.init({
|
|
12
12
|
dsn: SENTRY_EXPRESS_DSN,
|
|
13
|
-
release
|
|
14
|
-
environment
|
|
13
|
+
release,
|
|
14
|
+
environment,
|
|
15
15
|
// Increase the default truncation length of 250 to 2500 (x10)
|
|
16
16
|
// to have enough details in Sentry
|
|
17
17
|
maxValueLength: 2500
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupSentry.js","sources":["../../../src/lib/setupSentry.ts"],"sourcesContent":["import * as Sentry from \"@sentry/node\";\nimport
|
|
1
|
+
{"version":3,"file":"setupSentry.js","sources":["../../../src/lib/setupSentry.ts"],"sourcesContent":["import * as Sentry from \"@sentry/node\";\nimport { getEnvironmentInfo } from \"@slicemachine/manager\";\n\nimport { SENTRY_EXPRESS_DSN } from \"../constants\";\nimport { checkIsSentryEnabled } from \"./checkIsSentryEnabled\";\nimport * as pkg from \"../../package.json\";\n\nexport function setupSentry(): void {\n\tif (!checkIsSentryEnabled()) {\n\t\treturn;\n\t}\n\n\tconst { environment, release } = getEnvironmentInfo(pkg);\n\n\tSentry.init({\n\t\tdsn: SENTRY_EXPRESS_DSN,\n\t\trelease,\n\t\tenvironment,\n\t\t// Increase the default truncation length of 250 to 2500 (x10)\n\t\t// to have enough details in Sentry\n\t\tmaxValueLength: 2_500,\n\t});\n}\n"],"names":["pkg"],"mappings":";;;;;SAOgB,cAAW;AACtB,MAAA,CAAC,wBAAwB;AAC5B;AAAA,EACA;AAED,QAAM,EAAE,aAAa,QAAO,IAAK,mBAAmBA,QAAG;AAEvD,SAAO,KAAK;AAAA,IACX,KAAK;AAAA,IACL;AAAA,IACA;AAAA;AAAA;AAAA,IAGA,gBAAgB;AAAA,EAAA,CAChB;AACF;"}
|
|
@@ -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.9.
|
|
4
|
+
const version = "2.9.10-alpha.dev-new-release-process.2";
|
|
5
5
|
const description = "Init Prismic Slice Machine in your project";
|
|
6
6
|
const keywords = [
|
|
7
7
|
"typescript",
|
|
@@ -42,7 +42,7 @@ const scripts = {
|
|
|
42
42
|
dev: "vite build --watch",
|
|
43
43
|
format: "prettier --write .",
|
|
44
44
|
lint: "eslint --max-warnings 0 --ext .js,.ts .",
|
|
45
|
-
prepack: "
|
|
45
|
+
prepack: "$npm_execpath run build",
|
|
46
46
|
size: "size-limit",
|
|
47
47
|
test: "yarn lint && yarn types && yarn unit && yarn build && yarn size",
|
|
48
48
|
types: "tsc --noEmit",
|
|
@@ -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": "
|
|
58
|
+
"@slicemachine/manager": "workspace:*",
|
|
59
59
|
chalk: "^4.1.2",
|
|
60
60
|
giget: "^1.1.2",
|
|
61
61
|
globby: "^13.1.3",
|
|
@@ -69,7 +69,7 @@ const dependencies = {
|
|
|
69
69
|
};
|
|
70
70
|
const devDependencies = {
|
|
71
71
|
"@size-limit/preset-small-lib": "8.2.4",
|
|
72
|
-
"@slicemachine/plugin-kit": "
|
|
72
|
+
"@slicemachine/plugin-kit": "workspace:*",
|
|
73
73
|
"@types/listr": "0.14.4",
|
|
74
74
|
"@types/prompts": "2.4.3",
|
|
75
75
|
"@types/semver": "7.3.13",
|
|
@@ -95,7 +95,10 @@ const devDependencies = {
|
|
|
95
95
|
"vite-plugin-sdk": "0.1.1",
|
|
96
96
|
vitest: "0.32.0"
|
|
97
97
|
};
|
|
98
|
-
const
|
|
98
|
+
const publishConfig = {
|
|
99
|
+
access: "public"
|
|
100
|
+
};
|
|
101
|
+
const stableVersion = "2.9.9";
|
|
99
102
|
const pkg = {
|
|
100
103
|
name,
|
|
101
104
|
version,
|
|
@@ -114,7 +117,8 @@ const pkg = {
|
|
|
114
117
|
scripts,
|
|
115
118
|
dependencies,
|
|
116
119
|
devDependencies,
|
|
117
|
-
|
|
120
|
+
publishConfig,
|
|
121
|
+
stableVersion
|
|
118
122
|
};
|
|
119
123
|
exports.author = author;
|
|
120
124
|
exports.bin = bin;
|
|
@@ -124,14 +128,15 @@ exports.description = description;
|
|
|
124
128
|
exports.devDependencies = devDependencies;
|
|
125
129
|
exports.exports = exports$1;
|
|
126
130
|
exports.files = files;
|
|
127
|
-
exports.gitHead = gitHead;
|
|
128
131
|
exports.keywords = keywords;
|
|
129
132
|
exports.license = license;
|
|
130
133
|
exports.main = main;
|
|
131
134
|
exports.module = module$1;
|
|
132
135
|
exports.name = name;
|
|
136
|
+
exports.publishConfig = publishConfig;
|
|
133
137
|
exports.repository = repository;
|
|
134
138
|
exports.scripts = scripts;
|
|
139
|
+
exports.stableVersion = stableVersion;
|
|
135
140
|
exports.type = type;
|
|
136
141
|
exports.types = types;
|
|
137
142
|
exports.version = version;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const name = "@slicemachine/init";
|
|
2
|
-
const version = "2.9.
|
|
2
|
+
const version = "2.9.10-alpha.dev-new-release-process.2";
|
|
3
3
|
const description = "Init Prismic Slice Machine in your project";
|
|
4
4
|
const keywords = [
|
|
5
5
|
"typescript",
|
|
@@ -40,7 +40,7 @@ const scripts = {
|
|
|
40
40
|
dev: "vite build --watch",
|
|
41
41
|
format: "prettier --write .",
|
|
42
42
|
lint: "eslint --max-warnings 0 --ext .js,.ts .",
|
|
43
|
-
prepack: "
|
|
43
|
+
prepack: "$npm_execpath run build",
|
|
44
44
|
size: "size-limit",
|
|
45
45
|
test: "yarn lint && yarn types && yarn unit && yarn build && yarn size",
|
|
46
46
|
types: "tsc --noEmit",
|
|
@@ -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": "
|
|
56
|
+
"@slicemachine/manager": "workspace:*",
|
|
57
57
|
chalk: "^4.1.2",
|
|
58
58
|
giget: "^1.1.2",
|
|
59
59
|
globby: "^13.1.3",
|
|
@@ -67,7 +67,7 @@ const dependencies = {
|
|
|
67
67
|
};
|
|
68
68
|
const devDependencies = {
|
|
69
69
|
"@size-limit/preset-small-lib": "8.2.4",
|
|
70
|
-
"@slicemachine/plugin-kit": "
|
|
70
|
+
"@slicemachine/plugin-kit": "workspace:*",
|
|
71
71
|
"@types/listr": "0.14.4",
|
|
72
72
|
"@types/prompts": "2.4.3",
|
|
73
73
|
"@types/semver": "7.3.13",
|
|
@@ -93,7 +93,10 @@ const devDependencies = {
|
|
|
93
93
|
"vite-plugin-sdk": "0.1.1",
|
|
94
94
|
vitest: "0.32.0"
|
|
95
95
|
};
|
|
96
|
-
const
|
|
96
|
+
const publishConfig = {
|
|
97
|
+
access: "public"
|
|
98
|
+
};
|
|
99
|
+
const stableVersion = "2.9.9";
|
|
97
100
|
const pkg = {
|
|
98
101
|
name,
|
|
99
102
|
version,
|
|
@@ -112,7 +115,8 @@ const pkg = {
|
|
|
112
115
|
scripts,
|
|
113
116
|
dependencies,
|
|
114
117
|
devDependencies,
|
|
115
|
-
|
|
118
|
+
publishConfig,
|
|
119
|
+
stableVersion
|
|
116
120
|
};
|
|
117
121
|
export {
|
|
118
122
|
author,
|
|
@@ -123,14 +127,15 @@ export {
|
|
|
123
127
|
devDependencies,
|
|
124
128
|
exports,
|
|
125
129
|
files,
|
|
126
|
-
gitHead,
|
|
127
130
|
keywords,
|
|
128
131
|
license,
|
|
129
132
|
main,
|
|
130
133
|
module,
|
|
131
134
|
name,
|
|
135
|
+
publishConfig,
|
|
132
136
|
repository,
|
|
133
137
|
scripts,
|
|
138
|
+
stableVersion,
|
|
134
139
|
type,
|
|
135
140
|
types,
|
|
136
141
|
version
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,98 +1,101 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
2
|
+
"name": "@slicemachine/init",
|
|
3
|
+
"version": "2.9.10-alpha.dev-new-release-process.2",
|
|
4
|
+
"description": "Init Prismic Slice Machine in your project",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"typescript",
|
|
7
|
+
"prismic"
|
|
8
|
+
],
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "ssh://git@github.com/prismicio/slice-machine.git",
|
|
12
|
+
"directory": "packages/init"
|
|
13
|
+
},
|
|
14
|
+
"license": "Apache-2.0",
|
|
15
|
+
"author": "Prismic <contact@prismic.io> (https://prismic.io)",
|
|
16
|
+
"type": "module",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"require": "./dist/index.cjs",
|
|
20
|
+
"import": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./cli": {
|
|
23
|
+
"require": "./dist/cli.cjs",
|
|
24
|
+
"import": "./dist/cli.js"
|
|
25
|
+
},
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"main": "dist/index.cjs",
|
|
29
|
+
"module": "dist/index.js",
|
|
30
|
+
"types": "dist/index.d.ts",
|
|
31
|
+
"bin": {
|
|
32
|
+
"slicemachine-init": "./bin/slicemachine-init.js"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"bin",
|
|
36
|
+
"dist",
|
|
37
|
+
"src"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "vite build",
|
|
41
|
+
"dev": "vite build --watch",
|
|
42
|
+
"format": "prettier --write .",
|
|
43
|
+
"lint": "eslint --max-warnings 0 --ext .js,.ts .",
|
|
44
|
+
"prepack": "$npm_execpath run build",
|
|
45
|
+
"size": "size-limit",
|
|
46
|
+
"test": "yarn lint && yarn types && yarn unit && yarn build && yarn size",
|
|
47
|
+
"types": "tsc --noEmit",
|
|
48
|
+
"unit": "vitest run --coverage",
|
|
49
|
+
"unit:watch": "vitest watch",
|
|
50
|
+
"depcheck": "depcheck --config=.depcheckrc",
|
|
51
|
+
"audit": "yarn npm audit --environment production --severity high"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@antfu/ni": "^0.20.0",
|
|
55
|
+
"@lihbr/listr-update-renderer": "^0.5.3",
|
|
56
|
+
"@sentry/node": "^7.70.0",
|
|
57
|
+
"@slicemachine/manager": "0.17.6-alpha.dev-new-release-process.2",
|
|
58
|
+
"chalk": "^4.1.2",
|
|
59
|
+
"giget": "^1.1.2",
|
|
60
|
+
"globby": "^13.1.3",
|
|
61
|
+
"listr": "^0.14.3",
|
|
62
|
+
"log-symbols": "^4.1.0",
|
|
63
|
+
"meow": "^11.0.0",
|
|
64
|
+
"open": "^8.4.2",
|
|
65
|
+
"p-limit": "^4.0.0",
|
|
66
|
+
"prompts": "^2.4.2",
|
|
67
|
+
"semver": "^7.3.8"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@size-limit/preset-small-lib": "8.2.4",
|
|
71
|
+
"@slicemachine/plugin-kit": "0.4.32-alpha.dev-new-release-process.2",
|
|
72
|
+
"@types/listr": "0.14.4",
|
|
73
|
+
"@types/prompts": "2.4.3",
|
|
74
|
+
"@types/semver": "7.3.13",
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "5.55.0",
|
|
76
|
+
"@typescript-eslint/parser": "5.55.0",
|
|
77
|
+
"@vitest/coverage-v8": "0.32.0",
|
|
78
|
+
"depcheck": "1.4.3",
|
|
79
|
+
"eslint": "8.37.0",
|
|
80
|
+
"eslint-config-prettier": "9.0.0",
|
|
81
|
+
"eslint-plugin-prettier": "5.0.1",
|
|
82
|
+
"eslint-plugin-tsdoc": "0.2.17",
|
|
83
|
+
"execa": "7.1.1",
|
|
84
|
+
"hook-std": "3.0.0",
|
|
85
|
+
"memfs": "3.4.13",
|
|
86
|
+
"mock-stdin": "1.0.0",
|
|
87
|
+
"msw": "1.1.0",
|
|
88
|
+
"parse-multipart-data": "1.5.0",
|
|
89
|
+
"prettier": "3.0.3",
|
|
90
|
+
"prettier-plugin-jsdoc": "1.1.1",
|
|
91
|
+
"size-limit": "8.2.4",
|
|
92
|
+
"typescript": "4.9.5",
|
|
93
|
+
"vite": "4.3.9",
|
|
94
|
+
"vite-plugin-sdk": "0.1.1",
|
|
95
|
+
"vitest": "0.32.0"
|
|
96
|
+
},
|
|
97
|
+
"publishConfig": {
|
|
98
|
+
"access": "public"
|
|
99
|
+
},
|
|
100
|
+
"stableVersion": "2.9.9"
|
|
101
|
+
}
|
|
@@ -137,7 +137,13 @@ export class SliceMachineInitProcess {
|
|
|
137
137
|
appName: pkg.name,
|
|
138
138
|
appVersion: pkg.version,
|
|
139
139
|
});
|
|
140
|
-
|
|
140
|
+
try {
|
|
141
|
+
await setupSentry();
|
|
142
|
+
} catch (error) {
|
|
143
|
+
// noop - We don't want to stop the user from using Slice Machine
|
|
144
|
+
// because of failed tracking set up. We probably couldn't determine the
|
|
145
|
+
// Sentry environment.
|
|
146
|
+
}
|
|
141
147
|
await this.manager.telemetry.track({
|
|
142
148
|
event: "command:init:start",
|
|
143
149
|
repository: this.options.repository,
|
package/src/lib/framework.ts
CHANGED
|
@@ -58,11 +58,21 @@ export type Framework = {
|
|
|
58
58
|
devDependencies: Record<string, string>;
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
const
|
|
62
|
-
|
|
61
|
+
const prereleaseComponents = semver.prerelease(pkgVersion);
|
|
62
|
+
let npmDistributionTag;
|
|
63
|
+
if (
|
|
64
|
+
prereleaseComponents !== null &&
|
|
65
|
+
prereleaseComponents.length >= 2 &&
|
|
66
|
+
process.env.NODE_ENV !== "test"
|
|
67
|
+
) {
|
|
68
|
+
const prereleaseIdentifier = prereleaseComponents.slice(0, -1).join(".");
|
|
69
|
+
npmDistributionTag = prereleaseIdentifier;
|
|
70
|
+
} else {
|
|
71
|
+
npmDistributionTag = "latest";
|
|
72
|
+
}
|
|
63
73
|
|
|
64
74
|
const DEFAULT_DEV_DEPENDENCIES: Record<string, string> = {
|
|
65
|
-
"slice-machine-ui":
|
|
75
|
+
"slice-machine-ui": npmDistributionTag,
|
|
66
76
|
};
|
|
67
77
|
|
|
68
78
|
/**
|
|
@@ -81,7 +91,7 @@ export const FRAMEWORKS: Record<string, Framework> = {
|
|
|
81
91
|
},
|
|
82
92
|
devDependencies: {
|
|
83
93
|
...DEFAULT_DEV_DEPENDENCIES,
|
|
84
|
-
"@slicemachine/adapter-nuxt2":
|
|
94
|
+
"@slicemachine/adapter-nuxt2": npmDistributionTag,
|
|
85
95
|
},
|
|
86
96
|
},
|
|
87
97
|
"nuxt-3": {
|
|
@@ -95,7 +105,7 @@ export const FRAMEWORKS: Record<string, Framework> = {
|
|
|
95
105
|
},
|
|
96
106
|
devDependencies: {
|
|
97
107
|
...DEFAULT_DEV_DEPENDENCIES,
|
|
98
|
-
"@slicemachine/adapter-nuxt":
|
|
108
|
+
"@slicemachine/adapter-nuxt": npmDistributionTag,
|
|
99
109
|
},
|
|
100
110
|
},
|
|
101
111
|
next: {
|
|
@@ -109,7 +119,7 @@ export const FRAMEWORKS: Record<string, Framework> = {
|
|
|
109
119
|
},
|
|
110
120
|
devDependencies: {
|
|
111
121
|
...DEFAULT_DEV_DEPENDENCIES,
|
|
112
|
-
"@slicemachine/adapter-next":
|
|
122
|
+
"@slicemachine/adapter-next": npmDistributionTag,
|
|
113
123
|
},
|
|
114
124
|
},
|
|
115
125
|
"sveltekit-1": {
|
|
@@ -123,7 +133,7 @@ export const FRAMEWORKS: Record<string, Framework> = {
|
|
|
123
133
|
},
|
|
124
134
|
devDependencies: {
|
|
125
135
|
...DEFAULT_DEV_DEPENDENCIES,
|
|
126
|
-
"@slicemachine/adapter-sveltekit":
|
|
136
|
+
"@slicemachine/adapter-sveltekit": npmDistributionTag,
|
|
127
137
|
},
|
|
128
138
|
},
|
|
129
139
|
"sveltekit-2": {
|
|
@@ -137,7 +147,7 @@ export const FRAMEWORKS: Record<string, Framework> = {
|
|
|
137
147
|
},
|
|
138
148
|
devDependencies: {
|
|
139
149
|
...DEFAULT_DEV_DEPENDENCIES,
|
|
140
|
-
"@slicemachine/adapter-sveltekit":
|
|
150
|
+
"@slicemachine/adapter-sveltekit": npmDistributionTag,
|
|
141
151
|
},
|
|
142
152
|
},
|
|
143
153
|
} as const;
|
|
@@ -154,7 +164,7 @@ export const UNIVERSAL: Framework = {
|
|
|
154
164
|
compatibility: {},
|
|
155
165
|
devDependencies: {
|
|
156
166
|
...DEFAULT_DEV_DEPENDENCIES,
|
|
157
|
-
"@slicemachine/adapter-universal":
|
|
167
|
+
"@slicemachine/adapter-universal": npmDistributionTag,
|
|
158
168
|
},
|
|
159
169
|
};
|
|
160
170
|
|
package/src/lib/setupSentry.ts
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
import * as Sentry from "@sentry/node";
|
|
2
|
-
import
|
|
2
|
+
import { getEnvironmentInfo } from "@slicemachine/manager";
|
|
3
3
|
|
|
4
4
|
import { SENTRY_EXPRESS_DSN } from "../constants";
|
|
5
5
|
import { checkIsSentryEnabled } from "./checkIsSentryEnabled";
|
|
6
|
-
import
|
|
6
|
+
import * as pkg from "../../package.json";
|
|
7
7
|
|
|
8
8
|
export function setupSentry(): void {
|
|
9
9
|
if (!checkIsSentryEnabled()) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const
|
|
14
|
-
semver.prerelease(version) === null && semver.lte("0.1.0", version);
|
|
13
|
+
const { environment, release } = getEnvironmentInfo(pkg);
|
|
15
14
|
|
|
16
15
|
Sentry.init({
|
|
17
16
|
dsn: SENTRY_EXPRESS_DSN,
|
|
18
|
-
release
|
|
19
|
-
environment
|
|
20
|
-
? import.meta.env.MODE || "production"
|
|
21
|
-
: "alpha",
|
|
17
|
+
release,
|
|
18
|
+
environment,
|
|
22
19
|
// Increase the default truncation length of 250 to 2500 (x10)
|
|
23
20
|
// to have enough details in Sentry
|
|
24
21
|
maxValueLength: 2_500,
|