@stepzen/sdk 0.28.0-beta.0 → 0.28.0-beta.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.
|
@@ -12,9 +12,7 @@ export declare const fetchGraphQLQuery: <T = Record<string, any>>({ url, query,
|
|
|
12
12
|
variables?: Record<string, any> | undefined;
|
|
13
13
|
operationName?: string | undefined;
|
|
14
14
|
headers?: Record<string, any> | undefined;
|
|
15
|
-
}) => Promise<ExecutionResult<T,
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
}>>;
|
|
15
|
+
}) => Promise<ExecutionResult<T, import("graphql/jsutils/ObjMap").ObjMap<unknown>>>;
|
|
18
16
|
export declare const fetchZenCtlGraphQLQuery: <T = Record<string, any>>({ account, adminKey, deploymentType, query, variables, sdkConfig, }: {
|
|
19
17
|
account: string;
|
|
20
18
|
adminKey: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/shared/graphql-client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;AAE5C,OAAO,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAK1C,oBAAY,eAAe,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IACnD,sBAAsB,CAAC,KAAK,CAAC,GAC7B,oBAAoB,CAAC,KAAK,CAAC,CAAA;AAG/B,aAAK,sBAAsB,CAAC,KAAK,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG;IAC5D,IAAI,EAAE,KAAK,CAAA;IACX,MAAM,EAAE,SAAS,CAAA;CAClB,CAAA;AAGD,aAAK,oBAAoB,CAAC,KAAK,IAAI,eAAe,CAAC,KAAK,CAAC,GACvD,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAA;AAElD,eAAO,MAAM,iBAAiB;SAOvB,GAAG,GAAG,MAAM;WACV,MAAM
|
|
1
|
+
{"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/shared/graphql-client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;AAE5C,OAAO,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAK1C,oBAAY,eAAe,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IACnD,sBAAsB,CAAC,KAAK,CAAC,GAC7B,oBAAoB,CAAC,KAAK,CAAC,CAAA;AAG/B,aAAK,sBAAsB,CAAC,KAAK,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG;IAC5D,IAAI,EAAE,KAAK,CAAA;IACX,MAAM,EAAE,SAAS,CAAA;CAClB,CAAA;AAGD,aAAK,oBAAoB,CAAC,KAAK,IAAI,eAAe,CAAC,KAAK,CAAC,GACvD,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAA;AAElD,eAAO,MAAM,iBAAiB;SAOvB,GAAG,GAAG,MAAM;WACV,MAAM;;;;mFAoDd,CAAA;AAED,eAAO,MAAM,uBAAuB;aAQzB,MAAM;cACL,MAAM;oBACA,MAAM;WACf,MAAM;;eAEF,kBAAkB;iCAc9B,CAAA;AAED,eAAO,MAAM,8BAA8B;SAMpC,GAAG,GAAG,MAAM;WACV,MAAM;;eAEF,kBAAkB;iCAc9B,CAAA"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.transpileConfigurationset = void 0;
|
|
5
5
|
const dotenv = require("dotenv");
|
|
6
6
|
const debug = require("debug");
|
|
7
|
-
const
|
|
7
|
+
const fsx = require("fs-extra");
|
|
8
8
|
const os = require("os");
|
|
9
9
|
const path = require("path");
|
|
10
10
|
const transpiler_1 = require("@stepzen/transpiler");
|
|
@@ -18,11 +18,11 @@ async function transpileConfigurationset(file) {
|
|
|
18
18
|
dotenv.config({ path: path.resolve(source, '.env') });
|
|
19
19
|
const tmp = path.join(os.tmpdir(), `stepzen-transpiler-${Date.now()}`);
|
|
20
20
|
const configPath = path.join(tmp, 'config.yaml');
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
fsx.ensureDirSync(tmp);
|
|
22
|
+
fsx.copyFileSync(file, configPath);
|
|
23
23
|
const result = await (0, transpiler_1.transpile)(tmp);
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
fsx.emptyDirSync(tmp);
|
|
25
|
+
fsx.writeFileSync(configPath, result.config || '');
|
|
26
26
|
return configPath;
|
|
27
27
|
}
|
|
28
28
|
exports.transpileConfigurationset = transpileConfigurationset;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transpiling.js","sourceRoot":"","sources":["../../src/shared/transpiling.ts"],"names":[],"mappings":";AAAA,mDAAmD;;;AAEnD,iCAAgC;AAChC,+BAA8B;AAC9B
|
|
1
|
+
{"version":3,"file":"transpiling.js","sourceRoot":"","sources":["../../src/shared/transpiling.ts"],"names":[],"mappings":";AAAA,mDAAmD;;;AAEnD,iCAAgC;AAChC,+BAA8B;AAC9B,gCAA+B;AAC/B,yBAAwB;AACxB,6BAA4B;AAC5B,oDAA6C;AAkBtC,KAAK,UAAU,yBAAyB,CAAC,IAAa;IAC3D,IAAI,CAAC,IAAI,EAAE;QACT,OAAM;KACP;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;IACvD,KAAK,CAAC,gBAAgB,CAAC,CACrB,qBAAqB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACzC,oCAAoC,CACvC,CAAA;IACD,MAAM,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,EAAC,CAAC,CAAA;IAEnD,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,sBAAsB,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;IACtE,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,CAAA;IAEhD,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;IACtB,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IAElC,MAAM,MAAM,GAAG,MAAM,IAAA,sBAAS,EAAC,GAAG,CAAC,CAAA;IAEnC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IACrB,GAAG,CAAC,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAA;IAClD,OAAO,UAAU,CAAA;AACnB,CAAC;AAvBD,8DAuBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stepzen/sdk",
|
|
3
|
-
"version": "0.28.0-beta.
|
|
3
|
+
"version": "0.28.0-beta.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Darren Waddell <darren@stepzen.com>",
|
|
6
6
|
"homepage": "https://stepzen.com",
|
|
@@ -22,32 +22,33 @@
|
|
|
22
22
|
"posttest": "prettier . --check"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@stepzen/fetch": "0.28.0-beta.
|
|
26
|
-
"@stepzen/transpiler": "0.28.0-beta.
|
|
25
|
+
"@stepzen/fetch": "0.28.0-beta.2",
|
|
26
|
+
"@stepzen/transpiler": "0.28.0-beta.2",
|
|
27
27
|
"archiver": "^5.3.0",
|
|
28
28
|
"debug": "^4.3.4",
|
|
29
|
-
"dotenv": "^16.0.
|
|
29
|
+
"dotenv": "^16.0.3",
|
|
30
30
|
"form-data": "^4.0.0",
|
|
31
|
-
"fs-extra": "^
|
|
32
|
-
"glob": "^7.2.
|
|
33
|
-
"graphql": "^
|
|
31
|
+
"fs-extra": "^9.1.0",
|
|
32
|
+
"glob": "^7.2.3",
|
|
33
|
+
"graphql": "^16.6.0",
|
|
34
34
|
"is-wsl": "^2.2.0",
|
|
35
35
|
"yaml": "^1.10.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/archiver": "^5.1
|
|
39
|
-
"@types/debug": "^4.1.
|
|
40
|
-
"@types/fs-extra": "^9.0.
|
|
41
|
-
"@types/glob": "^7.
|
|
38
|
+
"@types/archiver": "^5.3.1",
|
|
39
|
+
"@types/debug": "^4.1.7",
|
|
40
|
+
"@types/fs-extra": "^9.0.13",
|
|
41
|
+
"@types/glob": "^7.2.0",
|
|
42
42
|
"@types/license-checker": "^25.0.1",
|
|
43
43
|
"@types/mocha": "^8.2.2",
|
|
44
|
+
"@types/node-fetch": "^2.6.2",
|
|
44
45
|
"chai": "^4.3.4",
|
|
45
46
|
"fancy-test": "^1.4.10",
|
|
46
47
|
"license-checker": "^25.0.1",
|
|
47
48
|
"mocha": "^8.3.2",
|
|
48
49
|
"nyc": "^15.1.0",
|
|
49
|
-
"prettier": "^2.
|
|
50
|
+
"prettier": "^2.8.3",
|
|
50
51
|
"ts-node": "^10.8.2"
|
|
51
52
|
},
|
|
52
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "303712442533aeb30d32cc276f695afad4518aed"
|
|
53
54
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as dotenv from 'dotenv'
|
|
4
4
|
import * as debug from 'debug'
|
|
5
|
-
import * as
|
|
5
|
+
import * as fsx from 'fs-extra'
|
|
6
6
|
import * as os from 'os'
|
|
7
7
|
import * as path from 'path'
|
|
8
8
|
import {transpile} from '@stepzen/transpiler'
|
|
@@ -38,12 +38,12 @@ export async function transpileConfigurationset(file?: string) {
|
|
|
38
38
|
const tmp = path.join(os.tmpdir(), `stepzen-transpiler-${Date.now()}`)
|
|
39
39
|
const configPath = path.join(tmp, 'config.yaml')
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
fsx.ensureDirSync(tmp)
|
|
42
|
+
fsx.copyFileSync(file, configPath)
|
|
43
43
|
|
|
44
44
|
const result = await transpile(tmp)
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
fsx.emptyDirSync(tmp)
|
|
47
|
+
fsx.writeFileSync(configPath, result.config || '')
|
|
48
48
|
return configPath
|
|
49
49
|
}
|