@kanonak-protocol/cli 1.1.0 → 1.2.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/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
#!/usr/bin/env node
|
|
3
2
|
import{Command as mn}from"commander";import{readFileSync as fn}from"fs";import{fileURLToPath as hn}from"url";import{dirname as yn,join as kn}from"path";import{KanonakParser as bn,PublisherIndex as wn,CredentialStore as vn,createAuthenticatedFetch as $n}from"@kanonak-protocol/sdk";import{readFileSync as Me,statSync as We}from"fs";import{resolve as qe,dirname as Ge}from"path";import{KanonakParser as Be,KanonakObjectValidator as Je,ValidationSeverity as oe}from"@kanonak-protocol/sdk";import{readFileSync as Le,readdirSync as Ne}from"fs";import{join as je,dirname as Ke,basename as ne}from"path";import{InMemoryKanonakDocumentRepository as Ue,FileSystemKanonakDocumentRepository as He,HttpKanonakDocumentRepository as Ve,getGlobalCachePath as ze}from"@kanonak-protocol/sdk";import{mkdirSync as Ie,readFileSync as ee,writeFileSync as te,existsSync as q,appendFileSync as Ae}from"fs";import{join as _e,dirname as Oe,isAbsolute as Fe}from"path";import{getGlobalCachePath as Ee}from"@kanonak-protocol/sdk";var $=class{constructor(e=Ee()){this.cacheDir=e;this.isProjectLocal=!Fe(e)}cacheDir;gitignoreChecked=!1;isProjectLocal;get(e,t,o){let r=this.getPath(e,t,o);return q(r)?ee(r,"utf-8"):null}put(e,t,o,r){let s=this.getPath(e,t,o);Ie(Oe(s),{recursive:!0}),te(s,r,"utf-8"),this.isProjectLocal&&this.ensureGitignore()}has(e,t,o){return q(this.getPath(e,t,o))}ensureGitignore(){if(this.gitignoreChecked)return;this.gitignoreChecked=!0;let e=".gitignore",t=this.cacheDir;if(q(e)){if(ee(e,"utf-8").split(`
|
|
4
3
|
`).some(r=>r.trim()===t||r.trim()===t+"/"))return;Ae(e,`
|
|
5
4
|
${t}/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanonak-protocol/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Kanonak Protocol CLI - Validate and resolve Kanonak ontology packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"README.md"
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
|
-
"build": "tsup && tsc --emitDeclarationOnly",
|
|
16
|
+
"build": "tsup && node -e \"const f='dist/index.js';require('fs').writeFileSync(f,'#!/usr/bin/env node\\n'+require('fs').readFileSync(f,'utf8'))\" && tsc --emitDeclarationOnly",
|
|
17
17
|
"clean": "rimraf dist",
|
|
18
18
|
"typecheck": "tsc --noEmit",
|
|
19
19
|
"prepublishOnly": "npm run build"
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"semantic-web"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@kanonak-protocol/sdk": "^1.
|
|
38
|
-
"@kanonak-protocol/types": "^1.
|
|
37
|
+
"@kanonak-protocol/sdk": "^1.2.0",
|
|
38
|
+
"@kanonak-protocol/types": "^1.2.0",
|
|
39
39
|
"commander": "^13.0.0",
|
|
40
40
|
"js-yaml": "^4.1.1"
|
|
41
41
|
},
|