@botpress/cognitive 0.1.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/.turbo/turbo-build.log +28 -0
- package/.turbo/turbo-generate.log +4 -0
- package/build.ts +53 -0
- package/dist/index.cjs +995 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +244 -0
- package/dist/index.mjs +979 -0
- package/dist/index.mjs.map +7 -0
- package/package.json +44 -0
- package/readme.md +113 -0
- package/types.ts +31 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
> @botpress/cognitive@0.1.0 build /home/runner/work/botpress/botpress/packages/cognitive
|
|
3
|
+
> pnpm build:type && pnpm build:neutral && size-limit
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
> @botpress/cognitive@0.1.0 build:type /home/runner/work/botpress/botpress/packages/cognitive
|
|
7
|
+
> tsup ./src/index.ts --dts-resolve --dts-only --clean
|
|
8
|
+
|
|
9
|
+
CLI Building entry: ./src/index.ts
|
|
10
|
+
CLI Using tsconfig: tsconfig.json
|
|
11
|
+
CLI tsup v8.0.2
|
|
12
|
+
DTS Build start
|
|
13
|
+
DTS ⚡️ Build success in 1577ms
|
|
14
|
+
DTS dist/index.d.ts 8.92 KB
|
|
15
|
+
|
|
16
|
+
> @botpress/cognitive@0.1.0 build:neutral /home/runner/work/botpress/botpress/packages/cognitive
|
|
17
|
+
> ts-node -T ./build.ts --neutral
|
|
18
|
+
|
|
19
|
+
Done
|
|
20
|
+
|
|
21
|
+
[1mdist/index.cjs[22m
|
|
22
|
+
Size limit: [32m[1m50 kB[22m[39m
|
|
23
|
+
Size: [32m[1m6.4 kB[22m[39m [90mbrotlied[39m
|
|
24
|
+
|
|
25
|
+
[1mdist/index.mjs[22m
|
|
26
|
+
Size limit: [32m[1m50 kB[22m[39m
|
|
27
|
+
Size: [32m[1m6.28 kB[22m[39m [90mbrotlied[39m
|
|
28
|
+
|
package/build.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import esbuild from 'esbuild'
|
|
2
|
+
import { devDependencies } from './package.json'
|
|
3
|
+
|
|
4
|
+
const common: esbuild.BuildOptions = {
|
|
5
|
+
bundle: true,
|
|
6
|
+
minify: true,
|
|
7
|
+
sourcemap: true,
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const external = Object.keys(devDependencies)
|
|
11
|
+
|
|
12
|
+
const buildCjs = () =>
|
|
13
|
+
esbuild.build({
|
|
14
|
+
...common,
|
|
15
|
+
platform: 'node',
|
|
16
|
+
minify: false,
|
|
17
|
+
format: 'cjs',
|
|
18
|
+
external,
|
|
19
|
+
outfile: 'dist/index.cjs',
|
|
20
|
+
entryPoints: ['src/index.ts'],
|
|
21
|
+
allowOverwrite: true,
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const buildEsm = () =>
|
|
25
|
+
esbuild.build({
|
|
26
|
+
...common,
|
|
27
|
+
platform: 'browser',
|
|
28
|
+
format: 'esm',
|
|
29
|
+
minify: false,
|
|
30
|
+
external,
|
|
31
|
+
outfile: 'dist/index.mjs',
|
|
32
|
+
entryPoints: ['src/index.ts'],
|
|
33
|
+
allowOverwrite: true,
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
const main = async (argv: string[]) => {
|
|
37
|
+
if (argv.includes('--neutral')) {
|
|
38
|
+
await buildCjs()
|
|
39
|
+
await buildEsm()
|
|
40
|
+
} else {
|
|
41
|
+
throw new Error('you must specify a build target (--neutral)')
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
void main(process.argv.slice(2))
|
|
46
|
+
.then(() => {
|
|
47
|
+
console.info('Done')
|
|
48
|
+
process.exit(0)
|
|
49
|
+
})
|
|
50
|
+
.catch((error) => {
|
|
51
|
+
console.error(error)
|
|
52
|
+
process.exit(1)
|
|
53
|
+
})
|