@atproto/dev-env 0.2.0 → 0.2.1
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/build.js +35 -25
- package/dist/bin.js +0 -0
- package/package.json +7 -3
- package/tsconfig.build.tsbuildinfo +1 -0
- package/tsconfig.json +1 -0
- package/update-pkg.js +14 -0
- package/dist/cli.js +0 -250777
- package/dist/cli.js.map +0 -7
- package/dist/src/bin.d.ts +0 -1
- package/dist/src/bsky.d.ts +0 -14
- package/dist/src/cli.d.ts +0 -1
- package/dist/src/env.d.ts +0 -2
- package/dist/src/feed-gen.d.ts +0 -12
- package/dist/src/index.d.ts +0 -7
- package/dist/src/mock/data.d.ts +0 -2
- package/dist/src/mock/img/blur-hash-avatar-b64.d.ts +0 -2
- package/dist/src/mock/img/labeled-img-b64.d.ts +0 -2
- package/dist/src/mock/index.d.ts +0 -2
- package/dist/src/mock/labeled-img-b64.d.ts +0 -2
- package/dist/src/network-no-appview.d.ts +0 -14
- package/dist/src/network.d.ts +0 -24
- package/dist/src/pds.d.ts +0 -17
- package/dist/src/plc.d.ts +0 -13
- package/dist/src/test-env.d.ts +0 -53
- package/dist/src/types.d.ts +0 -24
- package/dist/src/util.d.ts +0 -3
- package/dist/tsconfig.build.tsbuildinfo +0 -1
package/build.js
CHANGED
@@ -1,27 +1,37 @@
|
|
1
|
+
const pkgJson = require('@npmcli/package-json')
|
1
2
|
const { copy } = require('esbuild-plugin-copy')
|
3
|
+
const { nodeExternalsPlugin } = require('esbuild-node-externals')
|
2
4
|
|
3
|
-
|
4
|
-
.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
5
|
+
const buildShallow =
|
6
|
+
process.argv.includes('--shallow') || process.env.ATP_BUILD_SHALLOW === 'true'
|
7
|
+
|
8
|
+
if (process.argv.includes('--update-main-to-dist')) {
|
9
|
+
return pkgJson
|
10
|
+
.load(__dirname)
|
11
|
+
.then((pkg) => pkg.update({ main: 'dist/index.js' }))
|
12
|
+
.then((pkg) => pkg.save())
|
13
|
+
}
|
14
|
+
|
15
|
+
require('esbuild').build({
|
16
|
+
logLevel: 'info',
|
17
|
+
entryPoints: ['src/index.ts', 'src/bin.ts'],
|
18
|
+
bundle: true,
|
19
|
+
sourcemap: true,
|
20
|
+
outdir: 'dist',
|
21
|
+
platform: 'node',
|
22
|
+
external: [
|
23
|
+
'better-sqlite3',
|
24
|
+
// Referenced in pg driver, but optional and we don't use it
|
25
|
+
'pg-native',
|
26
|
+
'sharp',
|
27
|
+
],
|
28
|
+
plugins: [].concat(buildShallow ? [nodeExternalsPlugin()] : []).concat([
|
29
|
+
copy({
|
30
|
+
assets: {
|
31
|
+
from: ['../pds/src/mailer/templates/**/*'],
|
32
|
+
to: ['./templates'],
|
33
|
+
keepStructure: true,
|
34
|
+
},
|
35
|
+
}),
|
36
|
+
]),
|
37
|
+
})
|
package/dist/bin.js
CHANGED
File without changes
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atproto/dev-env",
|
3
|
-
"version": "0.2.
|
4
|
-
"main": "
|
3
|
+
"version": "0.2.1",
|
4
|
+
"main": "dist/index.js",
|
5
5
|
"bin": "dist/bin.js",
|
6
6
|
"license": "MIT",
|
7
7
|
"repository": {
|
@@ -18,7 +18,11 @@
|
|
18
18
|
"lint": "eslint . --ext .ts,.tsx",
|
19
19
|
"lint:fix": "yarn lint --fix",
|
20
20
|
"verify": "run-p prettier lint",
|
21
|
-
"verify:fix": "yarn prettier:fix && yarn lint:fix"
|
21
|
+
"verify:fix": "yarn prettier:fix && yarn lint:fix",
|
22
|
+
"update-main-to-dist": "node ./update-pkg.js --update-main-to-dist",
|
23
|
+
"update-main-to-src": "node ./update-pkg.js --update-main-to-src",
|
24
|
+
"prepublish": "npm run update-main-to-dist",
|
25
|
+
"postpublish": "npm run update-main-to-src"
|
22
26
|
},
|
23
27
|
"dependencies": {
|
24
28
|
"@atproto/api": "*",
|