w-converhp 2.0.49 → 2.0.50

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.
@@ -26,6 +26,7 @@ async function core() {
26
26
  'path',
27
27
  'fs',
28
28
  ],
29
+ runin: 'nodejs',
29
30
  })
30
31
  .catch((err) => {
31
32
  console.log(err)
@@ -48,6 +49,7 @@ async function core() {
48
49
  'path',
49
50
  'fs',
50
51
  ],
52
+ runin: 'nodejs',
51
53
  })
52
54
  .catch((err) => {
53
55
  console.log(err)
@@ -70,35 +72,42 @@ async function core() {
70
72
  'path',
71
73
  'fs',
72
74
  ],
75
+ runin: 'nodejs',
73
76
  })
74
77
  .catch((err) => {
75
78
  console.log(err)
76
79
  })
77
80
 
78
- //因為WConverhpServer會import mergeFiles.wk.umd.js故得先編譯
79
- await rollupWorker({
80
- name: 'mergeFiles', //原模組名稱, 將來會掛於winodw下或於node引入使用
81
- type: 'function', //原模組輸出為函數, 可傳入參數初始化
82
- // execFunctionByInstance: true, //default, 原模組為計算函數回傳結果
83
- fpSrc: path.resolve(fdSrc, 'mergeFiles.mjs'), //原始檔案路徑
84
- fpTar: path.resolve(fdSrc, 'mergeFiles.wk.umd.js'), //檔案輸出路徑
85
- formatOut: 'umd',
86
- // bMinify: false,
81
+ await rollupFiles({
82
+ fns: ['WConverhpServer.mjs'],
83
+ fdSrc,
84
+ fdTar,
85
+ nameDistType: 'kebabCase',
87
86
  globals: {
87
+ 'worker_threads': 'worker_threads',
88
88
  'path': 'path',
89
89
  'fs': 'fs',
90
+ 'stream': 'stream',
91
+ 'crypto': 'crypto', //因crypto-js修改使用內建crypto方式, 會偵測nodejs並使用require內建的crypto, 故需剔除
92
+ '@hapi/hapi': '@hapi/hapi',
93
+ '@hapi/inert': '@hapi/inert',
94
+ // 'form-data': 'FormData',
90
95
  },
91
96
  external: [
97
+ 'worker_threads',
92
98
  'path',
93
99
  'fs',
100
+ 'stream',
101
+ 'crypto',
102
+ '@hapi/hapi',
103
+ '@hapi/inert',
104
+ // 'form-data',
94
105
  ],
106
+ runin: 'nodejs',
95
107
  })
96
- .catch((err) => {
97
- console.log(err)
98
- })
99
108
 
100
109
  await rollupFiles({
101
- fns: ['WConverhpServer.mjs', 'WConverhpClient.mjs'],
110
+ fns: ['WConverhpClient.mjs'],
102
111
  fdSrc,
103
112
  fdTar,
104
113
  nameDistType: 'kebabCase',
@@ -112,6 +121,7 @@ async function core() {
112
121
  // 'form-data': 'FormData',
113
122
  },
114
123
  external: [
124
+ 'worker_threads',
115
125
  'path',
116
126
  'fs',
117
127
  'stream',
@@ -120,6 +130,7 @@ async function core() {
120
130
  '@hapi/inert',
121
131
  // 'form-data',
122
132
  ],
133
+ runin: 'browser',
123
134
  })
124
135
 
125
136
  }