deploy.sh 1.0.0 → 3.0.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/.claude/settings.local.json +36 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +105 -0
- package/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +56 -0
- package/.github/workflows/ci.yml +29 -0
- package/.github/workflows/pages.yml +48 -0
- package/.oxfmtrc.json +7 -0
- package/.oxlintrc.json +11 -0
- package/LICENSE +183 -183
- package/README.md +99 -11
- package/app/actions/deployments.ts +82 -0
- package/app/actions/metrics.ts +13 -0
- package/app/root.tsx +60 -0
- package/app/routes/dashboard/detail/history.tsx +73 -0
- package/app/routes/dashboard/detail/layout.tsx +125 -0
- package/app/routes/dashboard/detail/logs.tsx +85 -0
- package/app/routes/dashboard/detail/overview.tsx +119 -0
- package/app/routes/dashboard/detail/requests.tsx +163 -0
- package/app/routes/dashboard/detail/resources.tsx +268 -0
- package/app/routes/dashboard/detail/shared.tsx +59 -0
- package/app/routes/dashboard/index.tsx +360 -0
- package/app/routes/dashboard/layout.tsx +30 -0
- package/app/routes/docs/architecture.tsx +155 -0
- package/app/routes/docs/cli.tsx +122 -0
- package/app/routes/docs/deploying.tsx +105 -0
- package/app/routes/docs/index.tsx +104 -0
- package/app/routes/docs/layout.tsx +58 -0
- package/app/routes/home.tsx +134 -0
- package/app/routes/root.client.tsx +46 -0
- package/app/routes.ts +21 -0
- package/app/styles.css +15 -0
- package/app/theme.css +134 -0
- package/bin/deploy.js +360 -110
- package/docs-site/404.html +33 -0
- package/docs-site/home.tsx +130 -0
- package/docs-site/index.html +35 -0
- package/docs-site/layout.tsx +57 -0
- package/docs-site/main.tsx +41 -0
- package/docs-site/shell.tsx +34 -0
- package/docs-site/styles.css +4 -0
- package/drizzle.config.js +8 -0
- package/examples/docker/Dockerfile +5 -0
- package/examples/docker/server.js +18 -0
- package/examples/node/package.json +7 -0
- package/examples/node/pnpm-lock.yaml +9 -0
- package/examples/node/server.js +12 -0
- package/examples/static/index.html +48 -0
- package/package.json +41 -55
- package/public/favicon.ico +0 -0
- package/react-router-vite/entry.browser.tsx +49 -0
- package/react-router-vite/entry.rsc.single.tsx +7 -0
- package/react-router-vite/entry.rsc.tsx +36 -0
- package/react-router-vite/entry.ssr.tsx +29 -0
- package/react-router-vite/plugin.ts +114 -0
- package/react-router-vite/types.d.ts +11 -0
- package/react-router.config.ts +5 -0
- package/server/api.test.ts +344 -0
- package/server/api.ts +445 -0
- package/server/docker.ts +268 -0
- package/server/index.ts +17 -0
- package/server/metrics-collector.ts +29 -0
- package/server/schema.ts +56 -0
- package/server/store.test.ts +278 -0
- package/server/store.ts +398 -0
- package/tsconfig.json +21 -0
- package/vite.config.ts +45 -0
- package/vite.docs.config.ts +31 -0
- package/.eslintignore +0 -5
- package/.eslintrc +0 -23
- package/.travis.yml +0 -9
- package/.tryitout +0 -48
- package/CHANGELOG.md +0 -56
- package/bin/deploy-delete.js +0 -11
- package/bin/deploy-deploy.js +0 -31
- package/bin/deploy-list.js +0 -32
- package/bin/deploy-login.js +0 -39
- package/bin/deploy-logout.js +0 -12
- package/bin/deploy-logs.js +0 -19
- package/bin/deploy-open.js +0 -19
- package/bin/deploy-register.js +0 -40
- package/bin/deploy-server.js +0 -5
- package/bin/deploy-whoami.js +0 -12
- package/docs/code/CLI.html +0 -2901
- package/docs/code/Deployment.html +0 -2469
- package/docs/code/Request.html +0 -906
- package/docs/code/User.html +0 -1219
- package/docs/code/classifier.js.html +0 -121
- package/docs/code/deploy.js.html +0 -122
- package/docs/code/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/docs/code/fonts/OpenSans-Bold-webfont.svg +0 -1830
- package/docs/code/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/docs/code/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/docs/code/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
- package/docs/code/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/docs/code/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/docs/code/fonts/OpenSans-Italic-webfont.svg +0 -1830
- package/docs/code/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/docs/code/fonts/OpenSans-Light-webfont.eot +0 -0
- package/docs/code/fonts/OpenSans-Light-webfont.svg +0 -1831
- package/docs/code/fonts/OpenSans-Light-webfont.woff +0 -0
- package/docs/code/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/docs/code/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
- package/docs/code/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/docs/code/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/docs/code/fonts/OpenSans-Regular-webfont.svg +0 -1831
- package/docs/code/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/docs/code/fonts/OpenSans-Semibold-webfont.eot +0 -0
- package/docs/code/fonts/OpenSans-Semibold-webfont.svg +0 -1830
- package/docs/code/fonts/OpenSans-Semibold-webfont.ttf +0 -0
- package/docs/code/fonts/OpenSans-Semibold-webfont.woff +0 -0
- package/docs/code/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
- package/docs/code/fonts/OpenSans-SemiboldItalic-webfont.svg +0 -1830
- package/docs/code/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
- package/docs/code/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
- package/docs/code/helpers_cli.js.html +0 -315
- package/docs/code/helpers_util.js.html +0 -194
- package/docs/code/index.html +0 -66
- package/docs/code/models_deployment.js.html +0 -515
- package/docs/code/models_request.js.html +0 -158
- package/docs/code/models_user.js.html +0 -198
- package/docs/code/module-lib_classifier.html +0 -246
- package/docs/code/module-lib_deploy.html +0 -350
- package/docs/code/module-lib_helpers_util.html +0 -707
- package/docs/code/scripts/linenumber.js +0 -25
- package/docs/code/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/docs/code/scripts/prettify/lang-css.js +0 -2
- package/docs/code/scripts/prettify/prettify.js +0 -28
- package/docs/code/styles/jsdoc-default.css +0 -692
- package/docs/code/styles/prettify-jsdoc.css +0 -111
- package/docs/code/styles/prettify-tomorrow.css +0 -132
- package/docs/example.gif +0 -0
- package/docs/example.mov +0 -0
- package/docs/index.html +0 -4463
- package/docs/logo.png +0 -0
- package/docs/logo.pxm +0 -0
- package/docs/logo@2x.png +0 -0
- package/docs/main.css +0 -162
- package/docs/main.js +0 -53
- package/index.js +0 -55
- package/jsdoc.json +0 -27
- package/lib/classifier.js +0 -61
- package/lib/deploy.js +0 -62
- package/lib/helpers/cli.js +0 -255
- package/lib/helpers/util.js +0 -134
- package/lib/models/deployment.js +0 -455
- package/lib/models/request.js +0 -98
- package/lib/models/user.js +0 -138
- package/lib/server.js +0 -165
- package/lib/static/not-found.html +0 -30
- package/lib/static/page-could-not-load.html +0 -30
- package/lib/static/static-server.js +0 -69
- package/test/fixtures/docker/Dockerfile +0 -5
- package/test/fixtures/docker/index.js +0 -12
- package/test/fixtures/node/index.js +0 -8
- package/test/fixtures/node/package.json +0 -15
- package/test/fixtures/static/index.html +0 -14
- package/test/fixtures/static/main.css +0 -7
- package/test/fixtures/static/out.gifcd +0 -0
- package/test/fixtures/unknown/.gitkeep +0 -0
- package/test/lib/classifier.js +0 -51
- package/test/lib/helpers/util.js +0 -47
package/bin/deploy-list.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const moment = require('moment');
|
|
4
|
-
const Url = require('url');
|
|
5
|
-
const Table = require('turtler');
|
|
6
|
-
|
|
7
|
-
module.exports = async function(cli, spinner) {
|
|
8
|
-
spinner.text = 'Getting deployment list';
|
|
9
|
-
|
|
10
|
-
const { token, username } = await cli.getCredentials();
|
|
11
|
-
const { deployments } = await cli.getDeployments({ token, username });
|
|
12
|
-
|
|
13
|
-
spinner.stop();
|
|
14
|
-
|
|
15
|
-
if(deployments.length > 0) {
|
|
16
|
-
let data = [["name", "url", "age", "requests", "status"]];
|
|
17
|
-
|
|
18
|
-
deployments.forEach((r, i) => {
|
|
19
|
-
const config = Url.parse(cli.url);
|
|
20
|
-
config.host = `${r.subdomain}.${config.host}`;
|
|
21
|
-
const url = Url.format(config);
|
|
22
|
-
|
|
23
|
-
data[i + 1] = [r.name, url, moment(r.updated_at).fromNow(), r.requests.toString(), r.status];
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
let table = new Table(data);
|
|
27
|
-
|
|
28
|
-
console.log(table.markdown()); // eslint-disable-line
|
|
29
|
-
} else {
|
|
30
|
-
console.log('0 deployments found'); // eslint-disable-line
|
|
31
|
-
}
|
|
32
|
-
};
|
package/bin/deploy-login.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const inquirer = require('inquirer');
|
|
4
|
-
|
|
5
|
-
module.exports = async function(cli, spinner) {
|
|
6
|
-
spinner.stop();
|
|
7
|
-
|
|
8
|
-
const { username, password } = await inquirer.prompt([
|
|
9
|
-
{
|
|
10
|
-
name: 'username',
|
|
11
|
-
type: 'input',
|
|
12
|
-
message: 'Enter your e-mail address:',
|
|
13
|
-
validate: function( value ) {
|
|
14
|
-
if (value.length > 0 && value.indexOf('@') > -1 && value.indexOf('.') > -1) {
|
|
15
|
-
return true;
|
|
16
|
-
} else {
|
|
17
|
-
return 'Please enter your e-mail address';
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
name: 'password',
|
|
23
|
-
type: 'password',
|
|
24
|
-
message: 'Enter your password:',
|
|
25
|
-
mask: true,
|
|
26
|
-
validate: function(value) {
|
|
27
|
-
if (value.length) {
|
|
28
|
-
return true;
|
|
29
|
-
} else {
|
|
30
|
-
return 'Please enter your password';
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
]);
|
|
35
|
-
const credentials = await cli.login({ username, password});
|
|
36
|
-
await cli.cacheCredentials(credentials);
|
|
37
|
-
|
|
38
|
-
console.log(`Successfully logged in as ${credentials.username}`); // eslint-disable-line
|
|
39
|
-
};
|
package/bin/deploy-logout.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
module.exports = async function(cli, spinner) {
|
|
4
|
-
const { token, username } = await cli.getCredentials();
|
|
5
|
-
|
|
6
|
-
spinner.text = `Logging out of current session for ${username}`;
|
|
7
|
-
|
|
8
|
-
await cli.logout({ token, username });
|
|
9
|
-
await cli.cacheCredentials({ username: '', token: '' });
|
|
10
|
-
|
|
11
|
-
spinner.succeed(`Logged out of session for ${username} successfully`);
|
|
12
|
-
};
|
package/bin/deploy-logs.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
module.exports = async function(cli, spinner) {
|
|
4
|
-
spinner.text = `Getting logs for ${cli.application}`;
|
|
5
|
-
|
|
6
|
-
const { token, username } = await cli.getCredentials();
|
|
7
|
-
const { logs } = await cli.getLogs({ token, username, name: cli.application });
|
|
8
|
-
|
|
9
|
-
spinner.stop();
|
|
10
|
-
|
|
11
|
-
if(logs) {
|
|
12
|
-
console.log('' + // eslint-disable-line
|
|
13
|
-
`==========
|
|
14
|
-
${logs.join('').trim()}
|
|
15
|
-
==========`);
|
|
16
|
-
} else {
|
|
17
|
-
console.log('No logs available 🙈'); // eslint-disable-line
|
|
18
|
-
}
|
|
19
|
-
};
|
package/bin/deploy-open.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const Url = require('url');
|
|
4
|
-
const opn = require('opn');
|
|
5
|
-
|
|
6
|
-
module.exports = async function(cli, spinner) {
|
|
7
|
-
spinner.text = 'Opening up url to deployment instance';
|
|
8
|
-
|
|
9
|
-
const { token, username } = await cli.getCredentials();
|
|
10
|
-
const { deployment } = await cli.getDeployments({ token, username, name: cli.application });
|
|
11
|
-
|
|
12
|
-
const config = Url.parse(cli.url);
|
|
13
|
-
config.host = `${deployment.subdomain}.${config.host}`;
|
|
14
|
-
const url = Url.format(config);
|
|
15
|
-
|
|
16
|
-
spinner.text = `Opening deployment at ${url}`;
|
|
17
|
-
spinner.stopAndPersist();
|
|
18
|
-
opn(url, { wait: false });
|
|
19
|
-
};
|
package/bin/deploy-register.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const inquirer = require('inquirer');
|
|
4
|
-
|
|
5
|
-
module.exports = async function(cli, spinner) {
|
|
6
|
-
spinner.stop();
|
|
7
|
-
|
|
8
|
-
const { username, password } = await inquirer.prompt([
|
|
9
|
-
{
|
|
10
|
-
name: 'username',
|
|
11
|
-
type: 'input',
|
|
12
|
-
message: 'Enter a valid e-mail address:',
|
|
13
|
-
validate: function( value ) {
|
|
14
|
-
if (value.length > 0 && value.indexOf('@') > -1 && value.indexOf('.') > -1) {
|
|
15
|
-
return true;
|
|
16
|
-
} else {
|
|
17
|
-
return 'Please enter a valid e-mail address';
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
name: 'password',
|
|
23
|
-
type: 'password',
|
|
24
|
-
message: 'Enter a password:',
|
|
25
|
-
mask: true,
|
|
26
|
-
validate: function(value) {
|
|
27
|
-
if (value.length) {
|
|
28
|
-
return true;
|
|
29
|
-
} else {
|
|
30
|
-
return 'Please enter a password';
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
]);
|
|
35
|
-
|
|
36
|
-
const credentials = await cli.register({ username, password });
|
|
37
|
-
await cli.cacheCredentials(credentials);
|
|
38
|
-
|
|
39
|
-
console.log(`registered as ${credentials.username}`); // eslint-disable-line
|
|
40
|
-
};
|
package/bin/deploy-server.js
DELETED
package/bin/deploy-whoami.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
module.exports = async function(cli, spinner) {
|
|
4
|
-
spinner.text = 'Figuring out who you are';
|
|
5
|
-
|
|
6
|
-
const { token, username } = await cli.getCredentials();
|
|
7
|
-
const { user } = await cli.getUserDetails({ token, username });
|
|
8
|
-
|
|
9
|
-
spinner.stop();
|
|
10
|
-
|
|
11
|
-
console.log(`currently logged in as ${user.username}`); // eslint-disable-line
|
|
12
|
-
};
|