@cognite/cli 0.6.0-alpha.8 → 0.7.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/README.md +6 -31
- package/_templates/app/new/config/vite.config.ts.ejs.t +4 -2
- package/_templates/app/new/root/app.json.ejs.t +3 -5
- package/_templates/app/new/root/manifest.json.ejs.t +9 -0
- package/_templates/app/new/root/package.json.ejs.t +4 -7
- package/_templates/app/new/src/App.test.tsx.ejs.t +1 -1
- package/_templates/app/new/src/App.tsx.ejs.t +1 -32
- package/_templates/app/new/src/main.tsx.ejs.t +0 -9
- package/_vendor/spec-kit/README.md +1 -1
- package/dist/auth/index.d.ts +51 -0
- package/dist/auth/index.js +1 -0
- package/dist/chunk-A5ASLC6T.js +7 -0
- package/dist/chunk-EI7MMDWY.js +1 -0
- package/dist/chunk-QGJ3VKXY.js +1 -0
- package/dist/cli/cli.js +88 -319
- package/dist/deploy/index.d.ts +113 -0
- package/dist/deploy/index.js +9 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -0
- package/dist/skills-GQ5TZKCM.js +1 -0
- package/dist/vite/index.d.ts +1 -0
- package/dist/vite/index.js +1 -0
- package/package.json +76 -5
- package/_templates/app/new/cursor/data-modeling.mdc.ejs.t +0 -1996
- package/_templates/app/new/cursor/mcp.json.ejs.t +0 -10
- package/_templates/app/new/cursor/rules.mdc.ejs.t +0 -10
- package/dist/chunk-GFMJ4MJZ.js +0 -8
- package/dist/skills-4R3OUI44.js +0 -2
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { CogniteClient } from '@cognite/sdk';
|
|
2
|
+
|
|
3
|
+
type Deployment = {
|
|
4
|
+
org: string;
|
|
5
|
+
project: string;
|
|
6
|
+
baseUrl: string;
|
|
7
|
+
deployClientId: string;
|
|
8
|
+
deploySecretName: string;
|
|
9
|
+
published: boolean;
|
|
10
|
+
/** Identity provider type. Defaults to "cdf" if not specified */
|
|
11
|
+
idpType?: "cdf" | "entra_id";
|
|
12
|
+
/** Tenant ID for Entra ID authentication. Required when idpType is "entra_id" */
|
|
13
|
+
tenantId?: string;
|
|
14
|
+
};
|
|
15
|
+
type App = {
|
|
16
|
+
externalId: string;
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
versionTag: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
declare const deploy: (deployment: Deployment, app: App, folder: string) => Promise<void>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* App Hosting HTTP API layer.
|
|
26
|
+
*
|
|
27
|
+
* One method per remote endpoint — builds URLs, constructs request payloads,
|
|
28
|
+
* and parses responses. No business logic or orchestration lives here.
|
|
29
|
+
* Higher-level behaviour (idempotent creates, sequenced transitions) belongs
|
|
30
|
+
* in `AppHostingClient`, which extends this class.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
type AppHostingApiClient = Pick<CogniteClient, 'project' | 'post' | 'get' | 'authenticate' | 'getBaseUrl'>;
|
|
34
|
+
declare const APP_VERSION_LIFECYCLE_STATES: readonly ["DRAFT", "PUBLISHED", "DEPRECATED", "ARCHIVED"];
|
|
35
|
+
type AppVersionLifecycleState = (typeof APP_VERSION_LIFECYCLE_STATES)[number];
|
|
36
|
+
declare const APP_VERSION_ALIASES: readonly ["ACTIVE", "PREVIEW"];
|
|
37
|
+
type AppVersionAlias = (typeof APP_VERSION_ALIASES)[number];
|
|
38
|
+
interface AppVersion {
|
|
39
|
+
version: string;
|
|
40
|
+
lifecycleState: AppVersionLifecycleState;
|
|
41
|
+
alias?: AppVersionAlias;
|
|
42
|
+
comment?: string;
|
|
43
|
+
entrypoint: string;
|
|
44
|
+
createdTime: number;
|
|
45
|
+
createdBy: string;
|
|
46
|
+
appExternalId: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare class AppHostingClient {
|
|
50
|
+
private api;
|
|
51
|
+
constructor(client: AppHostingApiClient);
|
|
52
|
+
getVersion(appExternalId: string, version: string): Promise<AppVersion>;
|
|
53
|
+
uploadVersion(appExternalId: string, version: string, fileContent: Buffer, fileName: string, entryPath?: string): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Ensure the app exists — creates it if missing, treats 409 Conflict as
|
|
56
|
+
* success so the call is safe to repeat.
|
|
57
|
+
*/
|
|
58
|
+
ensureApp(externalId: string, name: string, description: string): Promise<void>;
|
|
59
|
+
/** Transition a version from DRAFT to PUBLISHED. */
|
|
60
|
+
publishVersion(appExternalId: string, version: string): Promise<void>;
|
|
61
|
+
/** Publish the version and immediately set it as the ACTIVE alias. */
|
|
62
|
+
publishAndActivate(appExternalId: string, version: string): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Set the ACTIVE alias on a version. Returns the version that was
|
|
65
|
+
* previously active (if any) so callers can surface "Superseded X"
|
|
66
|
+
* in CLI output.
|
|
67
|
+
*
|
|
68
|
+
* The "previously-active" lookup is purely informational — a failed
|
|
69
|
+
* lookup must not block the alias update.
|
|
70
|
+
*/
|
|
71
|
+
activateVersion(appExternalId: string, version: string): Promise<{
|
|
72
|
+
supersededVersion?: string;
|
|
73
|
+
}>;
|
|
74
|
+
/**
|
|
75
|
+
* Full deployment: ensure app exists, upload version, and optionally publish
|
|
76
|
+
* and activate.
|
|
77
|
+
*
|
|
78
|
+
* When `published` is false the version is uploaded in DRAFT state — stored
|
|
79
|
+
* but not served. Pass `published: true` to transition to PUBLISHED and set
|
|
80
|
+
* it as the ACTIVE alias so it starts receiving traffic.
|
|
81
|
+
*/
|
|
82
|
+
deploy(appExternalId: string, name: string, description: string, versionTag: string, fileContent: Buffer, fileName: string, published?: boolean): Promise<void>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Application Packaging
|
|
87
|
+
*
|
|
88
|
+
* Handles packaging of build directories into deployment-ready zip files.
|
|
89
|
+
*/
|
|
90
|
+
interface ApplicationPackagerOptions {
|
|
91
|
+
requireLockFile?: boolean;
|
|
92
|
+
}
|
|
93
|
+
declare class ApplicationPackager {
|
|
94
|
+
private distPath;
|
|
95
|
+
private appRoot;
|
|
96
|
+
private requireLockFile;
|
|
97
|
+
constructor(distDirectory?: string, options?: ApplicationPackagerOptions);
|
|
98
|
+
validateBuildDirectory(): void;
|
|
99
|
+
createZip(outputFilename?: string, verbose?: boolean): Promise<string>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
declare const getSdk: (deployment: Deployment, folder: string, env?: NodeJS.ProcessEnv) => Promise<CogniteClient>;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Get access token for deployment using the appropriate identity provider.
|
|
106
|
+
* Supports both CDF OAuth and Entra ID (Azure AD) authentication.
|
|
107
|
+
*
|
|
108
|
+
* Set COGNITE_TOKEN to skip OAuth entirely (useful when running the CLI
|
|
109
|
+
* against a local mock server — see cli/testing/msw/standalone.ts).
|
|
110
|
+
*/
|
|
111
|
+
declare const getToken: (deployment: Deployment, env?: NodeJS.ProcessEnv) => Promise<string>;
|
|
112
|
+
|
|
113
|
+
export { type App, AppHostingClient, ApplicationPackager, type Deployment, deploy, getSdk, getToken };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as s}from"../chunk-EI7MMDWY.js";import J from"fs";import ut from"path";var j="https://docs.cognite.com/cdf/access/";function f(e){return e!==null&&typeof e=="object"}s(f,"isRecord");function S(e){return e instanceof Error&&"status"in e&&typeof e.status=="number"}s(S,"isHttpError");function K(e){switch(e){case 401:return`Your credentials are invalid or expired. Check your client ID and secret.
|
|
2
|
+
See: ${j}`;case 403:return`You don't have the required CDF capabilities. Please contact your CDF admin.
|
|
3
|
+
See: ${j}`;default:return}}s(K,"httpStatusHint");function w(e){let t=e instanceof Error?e:new Error(String(e));if(!S(t))return null;let n=K(t.status);return n?Object.assign(new Error(`${t.message}
|
|
4
|
+
${n}`),{cause:t}):null}s(w,"enrichedHttpError");function W(e){if(!f(e))return null;let t=e.missing;if(Array.isArray(t))return t;let n=e.data;if(f(n)){let r=n.error;if(f(r)&&Array.isArray(r.missing))return r.missing;if(Array.isArray(n.missing))return n.missing}return null}s(W,"findMissingArray");function Z(e,t){if(!S(e)||e.status!==400)return!1;let n=W(e);return n?n.some(r=>f(r)&&typeof r.externalId=="string"&&t.includes(r.externalId)):!1}s(Z,"isMissingExternalIdError");function x(e,t){return S(e)&&e.status===404||Z(e,t)}s(x,"isNotFoundError");var H=["DRAFT","PUBLISHED","DEPRECATED","ARCHIVED"],q=["ACTIVE","PREVIEW"],I=class I extends Error{constructor(t,n){super(`Version ${n} of app ${t} not found`),this.name="AppVersionNotFoundError",this.appExternalId=t,this.version=n}};s(I,"AppVersionNotFoundError");var C=I;function M(e,t){return e.includes(t)}s(M,"includesValue");function X(e){return M(H,e)}s(X,"isAppVersionLifecycleState");function Q(e){return M(q,e)}s(Q,"isAppVersionAlias");function tt(e){return typeof e.version=="string"&&X(e.lifecycleState)&&typeof e.entrypoint=="string"&&typeof e.createdTime=="number"&&typeof e.createdBy=="string"&&typeof e.appExternalId=="string"&&(e.alias===void 0||Q(e.alias))&&(e.comment===void 0||typeof e.comment=="string")}s(tt,"isAppVersion");function N(e){if(!f(e))throw new Error("Invalid version response: not an object");if(!tt(e))throw new Error("Invalid version response: missing or malformed fields");return e}s(N,"parseAppVersion");var T=class T{constructor(t){this.client=t}get appsBasePath(){return`/api/v1/projects/${encodeURIComponent(this.client.project)}/apphosting/apps`}async createApp(t,n,r){try{await this.client.post(this.appsBasePath,{data:{items:[{externalId:t,name:n,description:r}]}})}catch(o){throw w(o)??o}}async uploadVersion(t,n,r,o,i="index.html"){console.log(`\u{1F4E4} Uploading version ${n}...`);let c=new FormData;c.append("file",new Blob([new Uint8Array(r)]),o),c.append("version",n),c.append("entryPath",i);let p=encodeURIComponent(t),a=`${this.appsBasePath}/${p}/versions`,l=await this.client.authenticate(),h=`${this.client.getBaseUrl()}${a}`,d=new AbortController,Y=setTimeout(()=>d.abort(),300*1e3),y;try{y=await fetch(h,{method:"POST",headers:{Authorization:`Bearer ${l}`},body:c,signal:d.signal})}catch(g){throw g instanceof Error&&g.name==="AbortError"?new Error("Upload timed out after 5 minutes"):g}finally{clearTimeout(Y)}if(!y.ok){let g=await y.text(),V=g;try{let $=JSON.parse(g);if(f($)){let A=$.error;if(typeof A=="string")V=A;else if(f(A)){let E=A.message,B=A.code;V=typeof E=="string"?E:B!=null?`Unknown error (code: ${B})`:g}else{let E=$.message;V=typeof E=="string"?E:g}}}catch{}let O=y.headers.get("x-request-id"),G=O?` | X-Request-ID: ${O}`:"",U=Object.assign(new Error(`Upload failed: ${y.status} \u2014 ${V}${G}`),{status:y.status});throw w(U)??U}console.log(`\u2705 Version ${n} uploaded`)}async getVersion(t,n){let r=encodeURIComponent(t),o=encodeURIComponent(n),i=`${this.appsBasePath}/${r}/versions/${o}`;try{let c=await this.client.get(i);return N(c.data)}catch(c){throw x(c,[t,n])?new C(t,n):w(c)??c}}async getActiveVersion(t){let n=encodeURIComponent(t),r=`${this.appsBasePath}/${n}/active`;try{let o=await this.client.get(r);return N(o.data)}catch(o){if(x(o,[t]))return null;throw w(o)??o}}async updateVersions(t,n){let r=encodeURIComponent(t),o=`${this.appsBasePath}/${r}/versions/update`;try{await this.client.post(o,{data:{items:n}})}catch(i){throw w(i)??i}}};s(T,"AppHostingApi");var v=T;var b=class b{constructor(t){this.api=new v(t)}getVersion(t,n){return this.api.getVersion(t,n)}uploadVersion(t,n,r,o,i){return this.api.uploadVersion(t,n,r,o,i)}async ensureApp(t,n,r){console.log("\u{1F50D} Ensuring app exists...");try{await this.api.createApp(t,n,r),console.log(`\u2705 App '${t}' created`)}catch(o){if(S(o)&&o.status===409){console.log(`\u2705 App '${t}' already exists`);return}throw o}}async publishVersion(t,n){await this.api.updateVersions(t,[{version:n,update:{lifecycleState:{set:"PUBLISHED"}}}])}async publishAndActivate(t,n){console.log(`\u{1F680} Publishing and activating version ${n}...`),await this.api.updateVersions(t,[{version:n,update:{lifecycleState:{set:"PUBLISHED"},alias:{set:"ACTIVE"}}}]),console.log(`\u2705 Version ${n} is now PUBLISHED and ACTIVE`)}async activateVersion(t,n){let r=null;try{r=await this.api.getActiveVersion(t)}catch{r=null}let o=r&&r.version!==n?r.version:void 0;return await this.api.updateVersions(t,[{version:n,update:{alias:{set:"ACTIVE"}}}]),{supersededVersion:o}}async deploy(t,n,r,o,i,c,p=!1){console.log(`
|
|
5
|
+
\u{1F680} Deploying application via App Hosting API...
|
|
6
|
+
`);try{await this.ensureApp(t,n,r),await this.uploadVersion(t,o,i,c),p&&await this.publishAndActivate(t,o),console.log(`
|
|
7
|
+
\u2705 Deployment successful!`)}catch(a){let l=a instanceof Error?a.message:String(a);throw Object.assign(new Error(`Deployment failed: ${l}`),{cause:a})}}};s(b,"AppHostingClient");var P=b;import m from"fs";import u from"path";import{parseAndValidateManifestConfig as et}from"@cognite/app-sdk/vite";import{BlobReader as nt,Uint8ArrayWriter as rt,ZipWriter as ot}from"@zip.js/zip.js";var R="package.json",L="package-lock.json",z="manifest.json",D=class D{constructor(t="dist",n={}){this.distPath=u.isAbsolute(t)?t:u.join(process.cwd(),t),this.appRoot=u.dirname(this.distPath),this.requireLockFile=n.requireLockFile??!1}validateBuildDirectory(){if(!m.existsSync(this.distPath))throw new Error(`Build directory "${this.distPath}" not found. Run build first.`);let t=u.join(this.appRoot,R);if(!m.existsSync(t))throw new Error(`"${t}" not found. It is required for deployment.`);if(this.requireLockFile){let n=u.join(this.appRoot,L);if(!m.existsSync(n))throw new Error(`"${n}" not found. It is required for deployment.`)}}async createZip(t="app.zip",n=!1){this.validateBuildDirectory(),console.log("\u{1F4E6} Packaging application...");let r=new ot(new rt,{level:9}),o=s(async(a,l)=>{await r.add(l,new nt(await m.openAsBlob(a))),n&&console.log(` \u{1F4C4} ${l}`)},"addFile"),i=s(async a=>{let l=await m.promises.readdir(a,{withFileTypes:!0});for(let h of l){let d=u.join(a,h.name);h.isDirectory()?await i(d):await o(d,u.relative(this.distPath,d).replace(/\\/g,"/"))}},"addDir"),c;try{await i(this.distPath),await o(u.join(this.appRoot,R),R);let a=u.join(this.appRoot,z);if(m.existsSync(a)){let l=m.readFileSync(a,"utf-8");et(l,a),await o(a,z)}this.requireLockFile&&await o(u.join(this.appRoot,L),L),c=await r.close()}catch(a){let l=a instanceof Error?a.message:String(a);throw new Error(`Failed to create zip: ${l}`)}await m.promises.writeFile(t,c);let p=(c.byteLength/1024/1024).toFixed(2);return console.log(`\u2705 App packaged: ${t} (${p} MB)`),t}};s(D,"ApplicationPackager");var k=D;import{CogniteClient as lt}from"@cognite/sdk";var st=s(()=>{let e=process.env.DEPLOYMENT_SECRETS;if(!e)return{};try{let t=JSON.parse(e),n={};for(let[r,o]of Object.entries(t))if(typeof o=="string"){let i=r.toLowerCase().replace(/_/g,"-");n[i]=o}return n}catch(t){return console.error("Error parsing DEPLOYMENT_SECRETS:",t),{}}},"loadSecretsFromEnv"),it=s(e=>{let t;if(process.env.DEPLOYMENT_SECRET&&(t=process.env.DEPLOYMENT_SECRET),t||(t=st()[e]),t||(t=process.env[e]),!t)throw new Error(`Secret not found in environment: ${e}`);return t},"getSecretFromEnv"),at=s(e=>{if(!e)return"";try{return new URL(e).hostname.replace(/\.cognitedata\.com$/,"")}catch{let t=e.replace(/^https?:\/\//,"");return t=t.split("/")[0],t=t.split(":")[0],t=t.replace(/\.cognitedata\.com$/,""),t}},"extractClusterFromUrl"),ct=s(async(e,t)=>{let n=`Basic ${btoa(`${e}:${t}`)}`,r=await fetch("https://auth.cognite.com/oauth2/token",{method:"POST",headers:{Authorization:n,"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"client_credentials"})});if(!r.ok){let i=await r.text();throw new Error(`Failed to get token from CDF: ${r.status} ${r.statusText}
|
|
8
|
+
${i}`)}let o=await r.json();if(!o.access_token)throw new Error("No access token returned from CDF authentication");return o.access_token},"getTokenCdf"),pt=s(async(e,t,n,r)=>{if(!r)throw new Error("Entra ID authentication requires 'baseUrl' to be set in deployment configuration");let o=at(r);if(!o)throw new Error(`Entra ID authentication requires 'baseUrl' to be a valid CDF URL (e.g., https://cluster.cognitedata.com), got: ${r}`);let i=`https://login.microsoftonline.com/${n}/oauth2/v2.0/token`,c=`https://${o}.cognitedata.com/.default`,p=await fetch(i,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e,client_secret:t,scope:c,grant_type:"client_credentials"})});if(!p.ok){let l=await p.text();throw new Error(`Failed to get token from Entra ID: ${p.status} ${p.statusText}
|
|
9
|
+
${l}`)}let a=await p.json();if(!a.access_token)throw new Error("No access token returned from Entra ID authentication");return a.access_token},"getTokenEntra"),_=s(async(e,t=process.env)=>{if(t.COGNITE_TOKEN)return t.COGNITE_TOKEN;let{deployClientId:n,deploySecretName:r,idpType:o="cdf",tenantId:i,baseUrl:c}=e,p=it(r);if(o==="entra_id"){if(!i)throw new Error("Entra ID authentication requires 'tenantId' in deployment configuration");return pt(n,p,i,c)}return ct(n,p)},"getToken");var F=s(async(e,t,n=process.env)=>{let r=await _(e,n),o=n.COGNITE_BASE_URL??e.baseUrl,i=new lt({appId:t,project:e.project,baseUrl:o,oidcTokenProvider:s(async()=>r,"oidcTokenProvider")});return await i.authenticate(),i},"getSdk");var dt=s(async(e,t,n)=>{let r=await new k(`${n}/dist`,{requireLockFile:!0}).createZip("app.zip",!0);try{let{externalId:o,name:i,description:c,versionTag:p}=t,a=await F(e,n),l=new P(a),h=J.readFileSync(r),d=ut.basename(r);await l.deploy(o,i,c,p,h,d,e.published)}finally{try{J.unlinkSync(r)}catch{}}},"deploy");export{P as AppHostingClient,k as ApplicationPackager,dt as deploy,F as getSdk,_ as getToken};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,b as r,c as e,d as f,e as m,f as p,g as t}from"./chunk-QGJ3VKXY.js";import"./chunk-EI7MMDWY.js";export{p as AppSdkAuthProvider,m as DuneAuthProvider,f as DuneAuthProviderContext,e as EMPTY_SDK,r as createCDFSDK,o as getToken,t as useDune};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a,c as b,d as c,e as d}from"./chunk-A5ASLC6T.js";export{c as buildPullArgs,a as execSkillsCli,b as pullAllArgs,d as registerSkillsCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CspFetchDirective, MANIFEST_VERSION, ManifestConfig, NetworkAllowlistRule, buildFrameAncestors, buildHostedAppContentSecurityPolicy, fusionOpenPlugin, getManifestNetworkRules, loadManifestConfig, manifestCspPlugin, parseAndValidateManifestConfig, validateManifestConfig } from '@cognite/app-sdk/vite';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../chunk-EI7MMDWY.js";import{fusionOpenPlugin as i,manifestCspPlugin as n,buildFrameAncestors as o,buildHostedAppContentSecurityPolicy as s,getManifestNetworkRules as a,loadManifestConfig as l,MANIFEST_VERSION as f,parseAndValidateManifestConfig as p,validateManifestConfig as r}from"@cognite/app-sdk/vite";export{f as MANIFEST_VERSION,o as buildFrameAncestors,s as buildHostedAppContentSecurityPolicy,i as fusionOpenPlugin,a as getManifestNetworkRules,l as loadManifestConfig,n as manifestCspPlugin,p as parseAndValidateManifestConfig,r as validateManifestConfig};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognite/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "CLI for Cognite Data Fusion",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Cognite",
|
|
@@ -10,6 +10,31 @@
|
|
|
10
10
|
"directory": "packages/cli"
|
|
11
11
|
},
|
|
12
12
|
"type": "module",
|
|
13
|
+
"main": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./auth": {
|
|
22
|
+
"types": "./dist/auth/index.d.ts",
|
|
23
|
+
"import": "./dist/auth/index.js",
|
|
24
|
+
"default": "./dist/auth/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./deploy": {
|
|
27
|
+
"types": "./dist/deploy/index.d.ts",
|
|
28
|
+
"import": "./dist/deploy/index.js",
|
|
29
|
+
"default": "./dist/deploy/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./vite": {
|
|
32
|
+
"types": "./dist/vite/index.d.ts",
|
|
33
|
+
"development": "./src/vite/index.ts",
|
|
34
|
+
"import": "./dist/vite/index.js",
|
|
35
|
+
"default": "./dist/vite/index.js"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
13
38
|
"bin": {
|
|
14
39
|
"dune": "./dist/cli/cli.js"
|
|
15
40
|
},
|
|
@@ -19,17 +44,63 @@
|
|
|
19
44
|
"_vendor"
|
|
20
45
|
],
|
|
21
46
|
"scripts": {
|
|
22
|
-
"build": "tsup
|
|
23
|
-
"
|
|
47
|
+
"build": "tsup",
|
|
48
|
+
"prepare": "tsup",
|
|
49
|
+
"prepack": "pnpm run build",
|
|
50
|
+
"prepublishOnly": "pnpm run build",
|
|
51
|
+
"test": "vitest run",
|
|
52
|
+
"test:watch": "vitest",
|
|
53
|
+
"mock:server": "tsx cli/testing/msw/standalone.ts",
|
|
54
|
+
"mock:deploy": "cd ../../apps/mock-app && pnpm build && COGNITE_TOKEN=test-token COGNITE_BASE_URL=http://localhost:9090 node ../../packages/cli/dist/cli/cli.js deploy --skip-build",
|
|
55
|
+
"refresh-spec-kit": "bash scripts/refresh-spec-kit.sh"
|
|
24
56
|
},
|
|
25
57
|
"dependencies": {
|
|
58
|
+
"@cognite/app-sdk": "^0.4.0",
|
|
59
|
+
"@cognite/sdk": "^10.10.0",
|
|
60
|
+
"@sentry/node": "^10.51.0",
|
|
61
|
+
"@zip.js/zip.js": "^2.7.0",
|
|
62
|
+
"chalk": "^5.6.2",
|
|
26
63
|
"commander": "^14.0.3",
|
|
27
|
-
"
|
|
64
|
+
"dotenv": "^17.4.2",
|
|
65
|
+
"enquirer": "^2.4.1",
|
|
66
|
+
"execa": "^5.1.1",
|
|
67
|
+
"hygen": "^6.2.11",
|
|
68
|
+
"jose": "^6.2.2",
|
|
69
|
+
"mixpanel": "^0.21.0",
|
|
70
|
+
"open": "^10.1.0",
|
|
71
|
+
"openid-client": "^6.8.3",
|
|
72
|
+
"semver": "^7.7.0",
|
|
73
|
+
"skills": "^1.4.3",
|
|
74
|
+
"valibot": "^1.3.1"
|
|
75
|
+
},
|
|
76
|
+
"peerDependencies": {
|
|
77
|
+
"react": ">=18.0.0",
|
|
78
|
+
"react-dom": ">=18.0.0"
|
|
79
|
+
},
|
|
80
|
+
"peerDependenciesMeta": {
|
|
81
|
+
"react": {
|
|
82
|
+
"optional": true
|
|
83
|
+
},
|
|
84
|
+
"react-dom": {
|
|
85
|
+
"optional": true
|
|
86
|
+
}
|
|
28
87
|
},
|
|
29
88
|
"devDependencies": {
|
|
89
|
+
"@types/ejs": "^3.1.5",
|
|
90
|
+
"ejs": "^3.1.10",
|
|
91
|
+
"@mswjs/http-middleware": "^0.10.3",
|
|
92
|
+
"@types/express": "^5.0.6",
|
|
30
93
|
"@types/node": "^24.10.1",
|
|
94
|
+
"@types/react": "^19.2.6",
|
|
95
|
+
"@types/react-dom": "^19.2.3",
|
|
96
|
+
"@types/semver": "^7.7.0",
|
|
97
|
+
"express": "^5.2.1",
|
|
98
|
+
"msw": "^2.13.6",
|
|
99
|
+
"react": "^19.2.6",
|
|
100
|
+
"react-dom": "^19.2.6",
|
|
31
101
|
"tsup": "^8.4.0",
|
|
32
|
-
"typescript": "^5.0.0"
|
|
102
|
+
"typescript": "^5.0.0",
|
|
103
|
+
"vitest": "^2.1.8"
|
|
33
104
|
},
|
|
34
105
|
"engines": {
|
|
35
106
|
"node": ">=20"
|