@pikku/cli 0.6.9 → 0.6.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.
- package/CHANGELOG.md +6 -0
- package/dist/src/utils.js +5 -3
- package/package.json +1 -1
- package/src/utils.ts +9 -3
- package/dist/package.json +0 -43
package/CHANGELOG.md
CHANGED
package/dist/src/utils.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
// import packageInfo from '../package.json'
|
|
2
1
|
import { relative, dirname } from 'path';
|
|
3
2
|
import { mkdir, writeFile } from 'fs/promises';
|
|
4
3
|
import chalk from 'chalk';
|
|
5
|
-
import
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { readFileSync } from 'fs';
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
7
|
export const logPrimary = (message) => {
|
|
7
8
|
console.log(chalk.green(message));
|
|
8
9
|
};
|
|
@@ -120,7 +121,8 @@ const logo = `
|
|
|
120
121
|
`;
|
|
121
122
|
export const logPikkuLogo = () => {
|
|
122
123
|
logPrimary(logo);
|
|
123
|
-
|
|
124
|
+
const packageJson = JSON.parse(readFileSync(`${dirname(__filename)}/../../package.json`, 'utf-8'));
|
|
125
|
+
logPrimary(`⚙️ Welcome to the Pikku CLI (v${packageJson.version})\n`);
|
|
124
126
|
};
|
|
125
127
|
// TODO: add version back in once the ESM dust settles
|
|
126
128
|
export const DO_NOT_MODIFY_COMMENT = `/**
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
// import packageInfo from '../package.json'
|
|
2
1
|
import { relative, dirname } from 'path'
|
|
3
2
|
import { PathToNameAndType, InspectorState } from '@pikku/inspector'
|
|
4
3
|
import { mkdir, writeFile } from 'fs/promises'
|
|
5
4
|
import chalk from 'chalk'
|
|
6
|
-
import
|
|
5
|
+
import { fileURLToPath } from 'url'
|
|
6
|
+
import { readFileSync } from 'fs'
|
|
7
|
+
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
7
9
|
|
|
8
10
|
export const logPrimary = (message: string) => {
|
|
9
11
|
console.log(chalk.green(message))
|
|
@@ -231,7 +233,11 @@ const logo = `
|
|
|
231
233
|
|
|
232
234
|
export const logPikkuLogo = () => {
|
|
233
235
|
logPrimary(logo)
|
|
234
|
-
|
|
236
|
+
|
|
237
|
+
const packageJson = JSON.parse(
|
|
238
|
+
readFileSync(`${dirname(__filename)}/../../package.json`, 'utf-8')
|
|
239
|
+
)
|
|
240
|
+
logPrimary(`⚙️ Welcome to the Pikku CLI (v${packageJson.version})\n`)
|
|
235
241
|
}
|
|
236
242
|
|
|
237
243
|
// TODO: add version back in once the ESM dust settles
|
package/dist/package.json
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pikku/cli",
|
|
3
|
-
"version": "0.6.9",
|
|
4
|
-
"author": "yasser.fadl@gmail.com",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"bin": {
|
|
7
|
-
"pikku": "dist/bin/pikku.js"
|
|
8
|
-
},
|
|
9
|
-
"type": "module",
|
|
10
|
-
"main": "dist/bin/pikku.js",
|
|
11
|
-
"module": "dist/bin/pikku.js",
|
|
12
|
-
"scripts": {
|
|
13
|
-
"tsc": "tsc",
|
|
14
|
-
"build:esm": "tsc -b",
|
|
15
|
-
"schema": "ts-json-schema-generator -o cli.schema.json --path 'src/pikku-cli-config.ts' --type 'PikkuCLIConfig'",
|
|
16
|
-
"build": "yarn build:esm && yarn schema",
|
|
17
|
-
"ncu": "npx npm-check-updates -x '/.*glob.*/'",
|
|
18
|
-
"release": "yarn build && npm test",
|
|
19
|
-
"test": "bash run-tests.sh",
|
|
20
|
-
"test:watch": "bash run-tests.sh --watch",
|
|
21
|
-
"test:coverage": "bash run-tests.sh --coverage"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@openapi-contrib/json-schema-to-openapi-schema": "^3.0.2",
|
|
25
|
-
"@pikku/core": "^0.6.11",
|
|
26
|
-
"@pikku/inspector": "^0.6.2",
|
|
27
|
-
"@types/cookie": "^0.6.0",
|
|
28
|
-
"@types/uuid": "^10.0.0",
|
|
29
|
-
"chalk": "^5.4.1",
|
|
30
|
-
"commander": "^12",
|
|
31
|
-
"glob": "^10",
|
|
32
|
-
"path-to-regexp": "^8.2.0",
|
|
33
|
-
"ts-json-schema-generator": "^2.3.0",
|
|
34
|
-
"typescript": "^5.6",
|
|
35
|
-
"yaml": "^2.6.0"
|
|
36
|
-
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@types/node": "^22.7.8"
|
|
39
|
-
},
|
|
40
|
-
"engines": {
|
|
41
|
-
"node": ">=18"
|
|
42
|
-
}
|
|
43
|
-
}
|