@travetto/scaffold 7.0.9 → 7.0.10
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.
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// @ts-check
|
|
3
3
|
import { delimiter } from 'node:path';
|
|
4
|
+
import { writeFileSync, readFileSync } from 'node:fs';
|
|
4
5
|
|
|
5
6
|
await import('@travetto/compiler/bin/hook.js');
|
|
6
7
|
|
|
7
8
|
const { invoke } = await import('@travetto/compiler/support/invoke.ts');
|
|
8
9
|
|
|
9
10
|
if (process.env.npm_lifecycle_script?.includes('trv-scaffold')) { // Is npx run
|
|
11
|
+
writeFileSync('package.json', JSON.stringify({ ...JSON.parse(readFileSync('./package.json', 'utf-8')), type: 'module' }));
|
|
10
12
|
const parts = process.env.PATH?.split(delimiter) ?? [];
|
|
11
13
|
const item = parts.find(part => part.includes('npx') && part.includes('.bin'));
|
|
12
14
|
if (item) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/scaffold",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "App Scaffold for the Travetto framework",
|
|
6
6
|
"keywords": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"directory": "related/scaffold"
|
|
26
26
|
},
|
|
27
27
|
"bin": {
|
|
28
|
-
"trv-scaffold": "bin/trv-scaffold.
|
|
28
|
+
"trv-scaffold": "bin/trv-scaffold.js"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@travetto/cli": "^7.0.7",
|