mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-21 03:14:43 +12:00
ci: docker image build for proxy
This commit is contained in:
parent
47da24ff5c
commit
89235f32b0
27 changed files with 721 additions and 448 deletions
2
.github/workflows/publish-dev-docker.yml
vendored
2
.github/workflows/publish-dev-docker.yml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
|||
run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
|
||||
|
||||
- name: Build the image
|
||||
run: docker build -t discordjs/proxy:latest -f packages/proxy-container/Dockerfile .
|
||||
run: yarn docker build @discordjs/proxy-container -t discordjs/proxy:latest
|
||||
|
||||
- name: Push image to DockerHub
|
||||
run: docker push discordjs/proxy:latest
|
||||
|
|
2
.github/workflows/publish-docker.yml
vendored
2
.github/workflows/publish-docker.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
|||
run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
|
||||
|
||||
- name: Build docker image
|
||||
run: docker build -t discordjs/proxy:latest -f packages/proxy-container/Dockerfile .
|
||||
run: yarn docker build @discordjs/proxy-container -t discordjs/proxy:latest
|
||||
|
||||
- name: Tag image with major
|
||||
run: docker tag discordjs/proxy discordjs/proxy:$(cut -d '.' -f1 <<< $(jq --raw-output '.version' packages/proxy-container/package.json))
|
||||
|
|
257
.yarn/plugins/@yarnpkg/plugin-docker-build.cjs
vendored
Normal file
257
.yarn/plugins/@yarnpkg/plugin-docker-build.cjs
vendored
Normal file
|
@ -0,0 +1,257 @@
|
|||
/* eslint-disable */
|
||||
module.exports = {
|
||||
name: '@yarnpkg/plugin-docker-build',
|
||||
factory: function (require) {
|
||||
var plugin;
|
||||
(() => {
|
||||
'use strict';
|
||||
var t = {
|
||||
d: (e, o) => {
|
||||
for (var r in o) t.o(o, r) && !t.o(e, r) && Object.defineProperty(e, r, { enumerable: !0, get: o[r] });
|
||||
},
|
||||
o: (t, e) => Object.prototype.hasOwnProperty.call(t, e),
|
||||
r: (t) => {
|
||||
'undefined' != typeof Symbol &&
|
||||
Symbol.toStringTag &&
|
||||
Object.defineProperty(t, Symbol.toStringTag, { value: 'Module' }),
|
||||
Object.defineProperty(t, '__esModule', { value: !0 });
|
||||
},
|
||||
},
|
||||
e = {};
|
||||
t.r(e), t.d(e, { default: () => u });
|
||||
const o = require('@yarnpkg/cli'),
|
||||
r = require('clipanion'),
|
||||
i = require('@yarnpkg/core'),
|
||||
a = require('@yarnpkg/plugin-patch'),
|
||||
n = require('@yarnpkg/fslib');
|
||||
const s = require('@yarnpkg/plugin-pack');
|
||||
async function c({ workspace: t, destination: e, report: o }) {
|
||||
await s.packUtils.prepareForPack(t, { report: o }, async () => {
|
||||
const r = await s.packUtils.genPackList(t),
|
||||
a = i.Report.progressViaCounter(r.length),
|
||||
c = o.reportProgress(a);
|
||||
try {
|
||||
for (const i of r) {
|
||||
const r = n.ppath.join(t.cwd, i),
|
||||
s = n.ppath.join(e, t.relativeCwd, i);
|
||||
o.reportInfo(null, i), await n.xfs.copyPromise(s, r, { overwrite: !0 }), a.tick();
|
||||
}
|
||||
} finally {
|
||||
c.stop();
|
||||
}
|
||||
});
|
||||
}
|
||||
function p(t, e) {
|
||||
const o = (0, n.toFilename)(e);
|
||||
return n.ppath.isAbsolute(o) ? n.ppath.relative(t, o) : o;
|
||||
}
|
||||
const l = /^builtin<([^>]+)>$/;
|
||||
var d = function (t, e, o, r) {
|
||||
var i,
|
||||
a = arguments.length,
|
||||
n = a < 3 ? e : null === r ? (r = Object.getOwnPropertyDescriptor(e, o)) : r;
|
||||
if ('object' == typeof Reflect && 'function' == typeof Reflect.decorate) n = Reflect.decorate(t, e, o, r);
|
||||
else
|
||||
for (var s = t.length - 1; s >= 0; s--)
|
||||
(i = t[s]) && (n = (a < 3 ? i(n) : a > 3 ? i(e, o, n) : i(e, o)) || n);
|
||||
return a > 3 && n && Object.defineProperty(e, o, n), n;
|
||||
};
|
||||
class f extends o.BaseCommand {
|
||||
constructor() {
|
||||
super(...arguments), (this.args = []);
|
||||
}
|
||||
async execute() {
|
||||
const t = await i.Configuration.find(this.context.cwd, this.context.plugins),
|
||||
{ project: e } = await i.Project.find(t, this.context.cwd),
|
||||
o = e.getWorkspaceByIdent(i.structUtils.parseIdent(this.workspaceName)),
|
||||
r = (function ({
|
||||
project: t,
|
||||
workspaces: e,
|
||||
production: o = !1,
|
||||
scopes: r = o ? ['dependencies'] : i.Manifest.hardDependencies,
|
||||
}) {
|
||||
const a = new Set([...e]);
|
||||
for (const e of a)
|
||||
for (const o of r) {
|
||||
const r = e.manifest.getForScope(o).values();
|
||||
for (const e of r) {
|
||||
const o = t.tryWorkspaceByDescriptor(e);
|
||||
o && a.add(o);
|
||||
}
|
||||
}
|
||||
for (const e of t.workspaces)
|
||||
a.has(e)
|
||||
? o && e.manifest.devDependencies.clear()
|
||||
: (e.manifest.dependencies.clear(),
|
||||
e.manifest.devDependencies.clear(),
|
||||
e.manifest.peerDependencies.clear());
|
||||
return a;
|
||||
})({ project: e, workspaces: [o], production: this.production }),
|
||||
s = await (async function (t, e = 'Dockerfile') {
|
||||
const o = (0, n.toFilename)(e);
|
||||
if (n.ppath.isAbsolute(o)) return o;
|
||||
const r = [n.ppath.join(t.cwd, o), n.ppath.join(t.project.cwd, o)];
|
||||
for (const t of r) if (await n.xfs.existsPromise(t)) return t;
|
||||
throw new Error('Dockerfile is required');
|
||||
})(o, this.dockerFilePath),
|
||||
d = await i.Cache.find(t);
|
||||
return (
|
||||
await i.StreamReport.start(
|
||||
{ configuration: t, stdout: this.context.stdout, includeLogs: !this.context.quiet },
|
||||
async (t) => {
|
||||
await t.startTimerPromise('Resolution Step', async () => {
|
||||
await e.resolveEverything({ report: t, cache: d });
|
||||
}),
|
||||
await t.startTimerPromise('Fetch Step', async () => {
|
||||
await e.fetchEverything({ report: t, cache: d });
|
||||
}),
|
||||
await n.xfs.mktempPromise(async (o) => {
|
||||
const f = n.ppath.join(o, (0, n.toFilename)('manifests')),
|
||||
u = n.ppath.join(o, (0, n.toFilename)('packs'));
|
||||
await t.startTimerPromise('Copy files', async () => {
|
||||
await (async function ({ destination: t, project: e, report: o }) {
|
||||
const r = e.configuration.get('rcFilename');
|
||||
o.reportInfo(null, r),
|
||||
await n.xfs.copyPromise(n.ppath.join(t, r), n.ppath.join(e.cwd, r), { overwrite: !0 });
|
||||
})({ destination: f, project: e, report: t }),
|
||||
await (async function ({ destination: t, project: e, report: o }) {
|
||||
const r = n.ppath.join((0, n.toFilename)('.yarn'), (0, n.toFilename)('plugins'));
|
||||
o.reportInfo(null, r),
|
||||
await n.xfs.copyPromise(n.ppath.join(t, r), n.ppath.join(e.cwd, r), { overwrite: !0 });
|
||||
})({ destination: f, project: e, report: t }),
|
||||
await (async function ({ destination: t, project: e, report: o }) {
|
||||
const r = e.configuration.get('yarnPath'),
|
||||
i = n.ppath.relative(e.cwd, r),
|
||||
a = n.ppath.join(t, i);
|
||||
o.reportInfo(null, i), await n.xfs.copyPromise(a, r, { overwrite: !0 });
|
||||
})({ destination: f, project: e, report: t }),
|
||||
await (async function ({ destination: t, workspaces: e, report: o }) {
|
||||
for (const r of e) {
|
||||
const e = n.ppath.join(r.relativeCwd, i.Manifest.fileName),
|
||||
a = n.ppath.join(t, e),
|
||||
s = {};
|
||||
r.manifest.exportTo(s),
|
||||
o.reportInfo(null, e),
|
||||
await n.xfs.mkdirpPromise(n.ppath.dirname(a)),
|
||||
await n.xfs.writeJsonPromise(a, s);
|
||||
}
|
||||
})({ destination: f, workspaces: e.workspaces, report: t }),
|
||||
await (async function ({ destination: t, report: e, project: o, parseDescriptor: r }) {
|
||||
const a = new Set();
|
||||
for (const s of o.storedDescriptors.values()) {
|
||||
const c = r(
|
||||
i.structUtils.isVirtualDescriptor(s) ? i.structUtils.devirtualizeDescriptor(s) : s,
|
||||
);
|
||||
if (!c) continue;
|
||||
const { parentLocator: p, paths: d } = c;
|
||||
for (const r of d) {
|
||||
if (l.test(r)) continue;
|
||||
if (n.ppath.isAbsolute(r)) continue;
|
||||
const i = o.getWorkspaceByLocator(p),
|
||||
s = n.ppath.join(i.relativeCwd, r);
|
||||
if (a.has(s)) continue;
|
||||
a.add(s);
|
||||
const c = n.ppath.join(i.cwd, r),
|
||||
d = n.ppath.join(t, s);
|
||||
e.reportInfo(null, s),
|
||||
await n.xfs.mkdirpPromise(n.ppath.dirname(d)),
|
||||
await n.xfs.copyFilePromise(c, d);
|
||||
}
|
||||
}
|
||||
})({
|
||||
destination: f,
|
||||
report: t,
|
||||
project: e,
|
||||
parseDescriptor: (t) => {
|
||||
if (t.range.startsWith('exec:')) {
|
||||
const e = (function (t) {
|
||||
const { params: e, selector: o } = i.structUtils.parseRange(t),
|
||||
r = n.npath.toPortablePath(o);
|
||||
return {
|
||||
parentLocator:
|
||||
e && 'string' == typeof e.locator ? i.structUtils.parseLocator(e.locator) : null,
|
||||
path: r,
|
||||
};
|
||||
})(t.range);
|
||||
if (!e || !e.parentLocator) return;
|
||||
return { parentLocator: e.parentLocator, paths: [e.path] };
|
||||
}
|
||||
if (t.range.startsWith('patch:')) {
|
||||
const { parentLocator: e, patchPaths: o } = a.patchUtils.parseDescriptor(t);
|
||||
if (!e) return;
|
||||
return { parentLocator: e, paths: o };
|
||||
}
|
||||
},
|
||||
}),
|
||||
await (async function ({ destination: t, project: e, cache: o, report: r }) {
|
||||
for (const i of o.markedFiles) {
|
||||
const o = n.ppath.relative(e.cwd, i);
|
||||
(await n.xfs.existsPromise(i)) &&
|
||||
(r.reportInfo(null, o), await n.xfs.copyPromise(n.ppath.join(t, o), i));
|
||||
}
|
||||
})({ destination: f, project: e, cache: d, report: t }),
|
||||
await (async function ({ destination: t, project: e, report: o }) {
|
||||
const r = (0, n.toFilename)(e.configuration.get('lockfileFilename')),
|
||||
i = n.ppath.join(t, r);
|
||||
o.reportInfo(null, r),
|
||||
await n.xfs.mkdirpPromise(n.ppath.dirname(i)),
|
||||
await n.xfs.writeFilePromise(i, e.generateLockfile());
|
||||
})({ destination: f, project: e, report: t }),
|
||||
this.copyFiles &&
|
||||
this.copyFiles.length &&
|
||||
(await (async function ({ destination: t, files: e, dockerFilePath: o, report: r }) {
|
||||
const i = n.ppath.dirname(o);
|
||||
for (const o of e) {
|
||||
const e = p(i, o),
|
||||
a = n.ppath.join(i, e),
|
||||
s = n.ppath.join(t, e);
|
||||
r.reportInfo(null, e), await n.xfs.copyPromise(s, a);
|
||||
}
|
||||
})({ destination: f, files: this.copyFiles, dockerFilePath: s, report: t }));
|
||||
});
|
||||
for (const e of r) {
|
||||
const o = e.manifest.name ? i.structUtils.stringifyIdent(e.manifest.name) : '';
|
||||
await t.startTimerPromise('Pack workspace ' + o, async () => {
|
||||
await c({ workspace: e, report: t, destination: u });
|
||||
});
|
||||
}
|
||||
await i.execUtils.pipevp('docker', ['build', ...this.args, '-f', s, '.'], {
|
||||
cwd: o,
|
||||
strict: !0,
|
||||
stdin: this.context.stdin,
|
||||
stdout: this.context.stdout,
|
||||
stderr: this.context.stderr,
|
||||
});
|
||||
});
|
||||
},
|
||||
)
|
||||
).exitCode();
|
||||
}
|
||||
}
|
||||
(f.usage = r.Command.Usage({
|
||||
category: 'Docker-related commands',
|
||||
description: 'Build a Docker image for a workspace',
|
||||
details:
|
||||
'\n This command will build a efficient Docker image which only contains necessary dependencies for the specified workspace.\n\n You have to create a Dockerfile in your workspace or your project. You can also specify the path to Dockerfile using the "-f, --file" option.\n\n Additional arguments can be passed to "docker build" directly, please check the Docker docs for more info: https://docs.docker.com/engine/reference/commandline/build/\n\n You can copy additional files or folders to a Docker image using the "--copy" option. This is useful for secret keys or configuration files. The files will be copied to "manifests" folder. The path can be either a path relative to the Dockerfile or an absolute path.\n ',
|
||||
examples: [
|
||||
['Build a Docker image for a workspace', 'yarn docker build @foo/bar'],
|
||||
['Pass additional arguments to docker build command', 'yarn docker build @foo/bar -t image-tag'],
|
||||
[
|
||||
'Copy additional files to a Docker image',
|
||||
'yarn docker build --copy secret.key --copy config.json @foo/bar',
|
||||
],
|
||||
['Install production dependencies only', 'yarn docker build --production @foo/bar'],
|
||||
],
|
||||
})),
|
||||
d([r.Command.String()], f.prototype, 'workspaceName', void 0),
|
||||
d([r.Command.Proxy()], f.prototype, 'args', void 0),
|
||||
d([r.Command.String('-f,--file')], f.prototype, 'dockerFilePath', void 0),
|
||||
d([r.Command.Array('--copy')], f.prototype, 'copyFiles', void 0),
|
||||
d([r.Command.Boolean('--production')], f.prototype, 'production', void 0),
|
||||
d([r.Command.Path('docker', 'build')], f.prototype, 'execute', null);
|
||||
const u = { commands: [f] };
|
||||
plugin = e;
|
||||
})();
|
||||
return plugin;
|
||||
},
|
||||
};
|
|
@ -7,5 +7,7 @@ plugins:
|
|||
spec: '@yarnpkg/plugin-workspace-tools'
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
|
||||
spec: '@yarnpkg/plugin-version'
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-docker-build.cjs
|
||||
spec: 'https://github.com/Dcard/yarn-plugins/releases/latest/download/plugin-docker-build.js'
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.5.0.cjs
|
||||
|
|
|
@ -48,12 +48,12 @@
|
|||
"@react-icons/all-files": "^4.1.0",
|
||||
"@vercel/analytics": "^0.1.11",
|
||||
"@vercel/edge-config": "^0.1.5",
|
||||
"@vercel/og": "^0.4.1",
|
||||
"@vercel/og": "^0.4.2",
|
||||
"ariakit": "^2.0.0-next.43",
|
||||
"cmdk": "^0.2.0",
|
||||
"contentlayer": "^0.3.0",
|
||||
"contentlayer": "^0.3.1",
|
||||
"next": "^13.2.4",
|
||||
"next-contentlayer": "^0.3.0",
|
||||
"next-contentlayer": "^0.3.1",
|
||||
"next-themes": "^0.2.1",
|
||||
"react": "^18.2.0",
|
||||
"react-custom-scrollbars-2": "^4.5.0",
|
||||
|
@ -71,13 +71,13 @@
|
|||
"@next/bundle-analyzer": "^13.2.4",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"@testing-library/user-event": "^14.4.3",
|
||||
"@types/node": "18.15.9",
|
||||
"@types/react": "^18.0.29",
|
||||
"@types/node": "18.15.10",
|
||||
"@types/react": "^18.0.30",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"@unocss/cli": "^0.50.6",
|
||||
"@unocss/reset": "^0.50.6",
|
||||
"@vitejs/plugin-react": "^3.1.0",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"concurrently": "^7.6.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.36.0",
|
||||
|
@ -93,8 +93,8 @@
|
|||
"prettier-plugin-tailwindcss": "^0.2.5",
|
||||
"typescript": "^5.0.2",
|
||||
"unocss": "^0.50.6",
|
||||
"vercel": "^28.18.1",
|
||||
"vitest": "^0.29.7"
|
||||
"vercel": "^28.18.2",
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.13.0"
|
||||
|
|
|
@ -53,13 +53,13 @@
|
|||
"@react-icons/all-files": "^4.1.0",
|
||||
"@vercel/analytics": "^0.1.11",
|
||||
"@vercel/edge-config": "^0.1.5",
|
||||
"@vercel/og": "^0.4.1",
|
||||
"@vercel/og": "^0.4.2",
|
||||
"@vscode/codicons": "^0.0.32",
|
||||
"ariakit": "^2.0.0-next.43",
|
||||
"bright": "^0.7.0",
|
||||
"cmdk": "^0.2.0",
|
||||
"meilisearch": "^0.31.1",
|
||||
"next": "^13.2.5-canary.16",
|
||||
"meilisearch": "^0.32.0",
|
||||
"next": "^13.2.5-canary.20",
|
||||
"next-mdx-remote": "^4.4.1",
|
||||
"next-themes": "^0.2.1",
|
||||
"react": "^18.2.0",
|
||||
|
@ -77,13 +77,13 @@
|
|||
"@next/bundle-analyzer": "^13.2.4",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"@testing-library/user-event": "^14.4.3",
|
||||
"@types/node": "18.15.9",
|
||||
"@types/react": "^18.0.29",
|
||||
"@types/node": "18.15.10",
|
||||
"@types/react": "^18.0.30",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"@unocss/cli": "^0.50.6",
|
||||
"@unocss/reset": "^0.50.6",
|
||||
"@vitejs/plugin-react": "^3.1.0",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"concurrently": "^7.6.0",
|
||||
"cpy-cli": "^4.2.0",
|
||||
"cross-env": "^7.0.3",
|
||||
|
@ -96,8 +96,8 @@
|
|||
"prettier-plugin-tailwindcss": "^0.2.5",
|
||||
"typescript": "^5.0.2",
|
||||
"unocss": "^0.50.6",
|
||||
"vercel": "^28.18.1",
|
||||
"vitest": "^0.29.7"
|
||||
"vercel": "^28.18.2",
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.13.0"
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
},
|
||||
"homepage": "https://discord.js.org",
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^17.5.0",
|
||||
"@commitlint/cli": "^17.5.1",
|
||||
"@commitlint/config-angular": "^17.4.4",
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@favware/npm-deprecate": "^1.0.7",
|
||||
|
@ -55,11 +55,11 @@
|
|||
"is-ci": "^3.0.1",
|
||||
"lint-staged": "^13.2.0",
|
||||
"tsup": "^6.7.0",
|
||||
"turbo": "^1.8.5",
|
||||
"turbo": "^1.8.6",
|
||||
"typescript": "^5.0.2",
|
||||
"unocss": "^0.50.6",
|
||||
"vercel": "^28.18.1",
|
||||
"vitest": "^0.29.7"
|
||||
"vercel": "^28.18.2",
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"resolutions": {
|
||||
"@microsoft/tsdoc-config@~0.16.1": "patch:@microsoft/tsdoc-config@npm%3A0.16.2#./.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch",
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "16.18.20",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@types/node": "16.18.21",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-neon": "^0.1.41",
|
||||
|
@ -52,7 +52,7 @@
|
|||
"prettier": "^2.8.7",
|
||||
"tsup": "^6.7.0",
|
||||
"typescript": "^5.0.2",
|
||||
"vitest": "^0.29.7"
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
"@microsoft/tsdoc": "0.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "16.18.20",
|
||||
"@types/node": "16.18.21",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-neon": "^0.1.41",
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@microsoft/api-extractor": "^7.34.4",
|
||||
"@types/node": "16.18.20",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@types/node": "16.18.21",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-neon": "^0.1.41",
|
||||
|
@ -73,7 +73,7 @@
|
|||
"prettier": "^2.8.7",
|
||||
"tsup": "^6.7.0",
|
||||
"typescript": "^5.0.2",
|
||||
"vitest": "^0.29.7"
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
|
|
|
@ -66,8 +66,8 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@microsoft/api-extractor": "^7.34.4",
|
||||
"@types/node": "16.18.20",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@types/node": "16.18.21",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"downlevel-dts": "^0.11.0",
|
||||
"esbuild-plugin-version-injector": "^1.1.0",
|
||||
|
@ -77,7 +77,7 @@
|
|||
"prettier": "^2.8.7",
|
||||
"tsup": "^6.7.0",
|
||||
"typescript": "^5.0.2",
|
||||
"vitest": "^0.29.7"
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
|
|
|
@ -53,8 +53,8 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@microsoft/api-extractor": "^7.34.4",
|
||||
"@types/node": "16.18.20",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@types/node": "16.18.21",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.1.0",
|
||||
"eslint": "^8.36.0",
|
||||
|
@ -63,7 +63,7 @@
|
|||
"prettier": "^2.8.7",
|
||||
"tsup": "^6.7.0",
|
||||
"typescript": "^5.0.2",
|
||||
"vitest": "^0.29.7"
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
|
|
|
@ -56,8 +56,8 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@microsoft/api-extractor": "^7.34.4",
|
||||
"@types/node": "16.18.20",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@types/node": "16.18.21",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-neon": "^0.1.41",
|
||||
|
@ -65,7 +65,7 @@
|
|||
"prettier": "^2.8.7",
|
||||
"tsup": "^6.7.0",
|
||||
"typescript": "^5.0.2",
|
||||
"vitest": "^0.29.7"
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
|
|
|
@ -66,13 +66,13 @@
|
|||
"devDependencies": {
|
||||
"@discordjs/docgen": "workspace:^",
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@types/node": "16.18.20",
|
||||
"@types/node": "16.18.21",
|
||||
"dtslint": "^4.2.1",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"jest": "^29.5.0",
|
||||
"prettier": "^2.8.7",
|
||||
"tsd": "^0.28.0",
|
||||
"tsd": "^0.28.1",
|
||||
"tslint": "^6.1.3",
|
||||
"typescript": "^5.0.2"
|
||||
},
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@types/jsdoc-to-markdown": "^7.0.3",
|
||||
"@types/node": "16.18.20",
|
||||
"@types/node": "16.18.21",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-neon": "^0.1.41",
|
||||
|
|
|
@ -50,8 +50,8 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@microsoft/api-extractor": "^7.34.4",
|
||||
"@types/node": "16.18.20",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@types/node": "16.18.21",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-neon": "^0.1.41",
|
||||
|
@ -59,7 +59,7 @@
|
|||
"prettier": "^2.8.7",
|
||||
"tsup": "^6.7.0",
|
||||
"typescript": "^5.0.2",
|
||||
"vitest": "^0.29.7"
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@microsoft/api-extractor": "^7.34.4",
|
||||
"@types/node": "18.15.9",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@types/node": "18.15.10",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.1.0",
|
||||
"eslint": "^8.36.0",
|
||||
|
@ -74,7 +74,7 @@
|
|||
"prettier": "^2.8.7",
|
||||
"tsup": "^6.7.0",
|
||||
"typescript": "^5.0.2",
|
||||
"vitest": "^0.29.7"
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.13.0"
|
||||
|
|
|
@ -5,30 +5,10 @@ RUN apk add --no-cache libc6-compat
|
|||
|
||||
WORKDIR /usr/proxy
|
||||
|
||||
COPY . .
|
||||
RUN yarn dlx turbo prune --scope=@discordjs/proxy-container --docker
|
||||
COPY manifests .
|
||||
|
||||
FROM node:16-alpine AS installer
|
||||
|
||||
RUN apk update
|
||||
RUN apk add --no-cache libc6-compat
|
||||
|
||||
WORKDIR /usr/proxy
|
||||
|
||||
COPY .gitignore .gitignore
|
||||
COPY .yarn/ .yarn/
|
||||
COPY .yarnrc.yml .yarnrc.yml
|
||||
COPY --from=builder /usr/proxy/out/json/ .
|
||||
COPY --from=builder /usr/proxy/out/yarn.lock ./yarn.lock
|
||||
RUN yarn install
|
||||
|
||||
COPY --from=builder /usr/proxy/out/full/ .
|
||||
COPY tsup.config.ts tsup.config.ts
|
||||
COPY turbo.json turbo.json
|
||||
COPY tsconfig.json tsconfig.json
|
||||
RUN yarn dlx turbo run build --filter=@discordjs/proxy-container...
|
||||
|
||||
RUN yarn workspaces focus @discordjs/proxy-container --production
|
||||
RUN yarn install --immutable
|
||||
RUN rm -rf .yarn/cache
|
||||
|
||||
FROM node:16-alpine AS runner
|
||||
|
||||
|
@ -39,5 +19,6 @@ RUN adduser --system --uid 1001 proxy
|
|||
USER proxy
|
||||
|
||||
COPY --from=installer /usr/proxy .
|
||||
COPY packs .
|
||||
|
||||
CMD ["node", "--enable-source-maps", "packages/proxy-container/dist/index.js"]
|
||||
CMD ["node", "--enable-source-maps", "dist/index.js"]
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --format=pretty",
|
||||
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --fix --format=pretty",
|
||||
"fmt": "yarn format",
|
||||
"prepack": "yarn lint && yarn test && yarn build"
|
||||
"prepack": "yarn lint && yarn build"
|
||||
},
|
||||
"type": "module",
|
||||
"module": "./dist/index.js",
|
||||
|
@ -48,7 +48,7 @@
|
|||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "16.18.20",
|
||||
"@types/node": "16.18.21",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-neon": "^0.1.41",
|
||||
|
|
|
@ -63,9 +63,9 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@microsoft/api-extractor": "^7.34.4",
|
||||
"@types/node": "16.18.20",
|
||||
"@types/node": "16.18.21",
|
||||
"@types/supertest": "^2.0.12",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-neon": "^0.1.41",
|
||||
|
@ -74,7 +74,7 @@
|
|||
"supertest": "^6.3.3",
|
||||
"tsup": "^6.7.0",
|
||||
"typescript": "^5.0.2",
|
||||
"vitest": "^0.29.7"
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
|
|
|
@ -65,8 +65,8 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@microsoft/api-extractor": "^7.34.4",
|
||||
"@types/node": "16.18.20",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@types/node": "16.18.21",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.1.0",
|
||||
"eslint": "^8.36.0",
|
||||
|
@ -75,7 +75,7 @@
|
|||
"prettier": "^2.8.7",
|
||||
"tsup": "^6.7.0",
|
||||
"typescript": "^5.0.2",
|
||||
"vitest": "^0.29.7"
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
|
|
|
@ -55,8 +55,8 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^11.0.1",
|
||||
"@types/node": "16.18.20",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@types/node": "16.18.21",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-neon": "^0.1.41",
|
||||
|
@ -64,7 +64,7 @@
|
|||
"prettier": "^2.8.7",
|
||||
"tsup": "^6.7.0",
|
||||
"typescript": "^5.0.2",
|
||||
"vitest": "^0.29.7"
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
|
|
|
@ -51,12 +51,12 @@
|
|||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@ladle/react": "^2.10.2",
|
||||
"@react-icons/all-files": "^4.1.0",
|
||||
"@types/node": "16.18.20",
|
||||
"@types/react": "^18.0.29",
|
||||
"@types/node": "16.18.21",
|
||||
"@types/react": "^18.0.30",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"@unocss/reset": "^0.50.6",
|
||||
"@vitejs/plugin-react": "^3.1.0",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-neon": "^0.1.41",
|
||||
|
@ -66,7 +66,7 @@
|
|||
"unocss": "^0.50.6",
|
||||
"vite": "^4.2.1",
|
||||
"vite-plugin-dts": "^2.1.0",
|
||||
"vitest": "^0.29.7"
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
|
|
|
@ -54,17 +54,17 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@microsoft/api-extractor": "^7.34.4",
|
||||
"@types/node": "16.18.20",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@types/node": "16.18.21",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-neon": "^0.1.41",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.7",
|
||||
"tsd": "^0.28.0",
|
||||
"tsd": "^0.28.1",
|
||||
"tsup": "^6.7.0",
|
||||
"typescript": "^5.0.2",
|
||||
"vitest": "^0.29.7"
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@microsoft/api-extractor": "^7.34.4",
|
||||
"@types/jest": "^29.5.0",
|
||||
"@types/node": "16.18.20",
|
||||
"@types/node": "16.18.21",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.1.0",
|
||||
"eslint": "^8.36.0",
|
||||
|
|
|
@ -72,8 +72,8 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@microsoft/api-extractor": "^7.34.4",
|
||||
"@types/node": "16.18.20",
|
||||
"@vitest/coverage-c8": "^0.29.7",
|
||||
"@types/node": "16.18.21",
|
||||
"@vitest/coverage-c8": "^0.29.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.1.0",
|
||||
"eslint": "^8.36.0",
|
||||
|
@ -84,7 +84,7 @@
|
|||
"tsup": "^6.7.0",
|
||||
"typescript": "^5.0.2",
|
||||
"undici": "^5.21.0",
|
||||
"vitest": "^0.29.7",
|
||||
"vitest": "^0.29.8",
|
||||
"zlib-sync": "^0.1.8"
|
||||
},
|
||||
"engines": {
|
||||
|
|
Loading…
Reference in a new issue