@ampt/cli 0.0.1-beta.66 → 0.0.1-beta.68
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/cli.js +132 -132
- package/dist/cli.js.map +3 -3
- package/package.json +2 -3
- package/bin/sandbox +0 -39
- package/dist/sandbox.js +0 -572
- package/dist/sandbox.js.map +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ampt/cli",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.68",
|
|
4
4
|
"description": "Ampt command line interface",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
13
|
"bin": {
|
|
14
|
-
"ampt": "./bin/bin"
|
|
15
|
-
"ampt-sandbox": "./bin/sandbox"
|
|
14
|
+
"ampt": "./bin/bin"
|
|
16
15
|
},
|
|
17
16
|
"scripts": {
|
|
18
17
|
"prepublishOnly": "npm run build",
|
package/bin/sandbox
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict'
|
|
3
|
-
|
|
4
|
-
if (process.version.slice(1).split('.')[0] < 16) {
|
|
5
|
-
console.log('@ampt/cli requires Node.js 16+')
|
|
6
|
-
process.exit(-1)
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
if (!process.env.AMPT_STAGE && process.env.AMPT_ENDPOINT) {
|
|
10
|
-
if (process.env.AMPT_ENDPOINT.includes('.amptlabs.dev')) {
|
|
11
|
-
const subdomain = process.env.AMPT_ENDPOINT.replace(/https:\/\//, '').split('.')[0]
|
|
12
|
-
process.env.AMPT_STAGE = subdomain === 'api' ? 'dev' : subdomain
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
process.env.AMPT_STAGE = process.env.AMPT_STAGE || 'prod'
|
|
17
|
-
const stage = process.env.AMPT_STAGE
|
|
18
|
-
|
|
19
|
-
if (!process.env.AMPT_ENDPOINT) {
|
|
20
|
-
process.env.AMPT_ENDPOINT =
|
|
21
|
-
stage === 'prod' ? 'https://api.ampt.dev' : `https://${stage === 'dev' ? 'api' : stage}.amptlabs.dev`
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
process.env.AMPT_DASHBOARD_URL_ROOT = stage === 'prod' ? 'https://ampt.dev' : 'https://amptlabs.dev'
|
|
25
|
-
|
|
26
|
-
if (!process.env.AMPT_WS_ENDPOINT) {
|
|
27
|
-
process.env.AMPT_WS_ENDPOINT =
|
|
28
|
-
stage === 'prod'
|
|
29
|
-
? 'wss://ws.ampt.dev'
|
|
30
|
-
: stage === 'dev'
|
|
31
|
-
? 'wss://ws.amptlabs.dev'
|
|
32
|
-
: `wss://${stage}.ws.amptlabs.dev`
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
require('source-map-support').install({
|
|
36
|
-
handleUncaughtExceptions: false,
|
|
37
|
-
environment: 'node'
|
|
38
|
-
})
|
|
39
|
-
require('../dist/sandbox.js')
|