proscenium 0.3.0-x86_64-linux → 0.4.0-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/esbuild +0 -0
- data/lib/proscenium/compilers/esbuild/env_plugin.js +24 -3
- data/lib/proscenium/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58f737e5fa0b80684f7a5ddedf5cc9289dc7be0f434b19a0e896a3edd841bf08
|
4
|
+
data.tar.gz: 31953469f20839292f307548bb9e74deb77330cc36c14fd525a1abbaf49f25ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1ae53eb9ebfa8b03f16b35b2b202097e4fa5630ccbc1f2224265b67b5a3c1b452105f2fc5c2220e7644fefb23283f0d616f67a77c617a2adf36a74ba0bd546c
|
7
|
+
data.tar.gz: 6bfa5721620e454ab12f0c4f41ad431f2b8d71dc7b3573ca462e1c7c7cc91e7694f3eb758299065da79859fa028d2948f927f8501d635407de79e348432584ab
|
data/bin/esbuild
CHANGED
Binary file
|
@@ -1,10 +1,13 @@
|
|
1
1
|
import setup from './setup_plugin.js'
|
2
2
|
|
3
|
+
// Export environment variables as named exports only. You can also import from `env:ENV_VAR_NAME`,
|
4
|
+
// which will return the value of the environment variable as the default export. This allows you to
|
5
|
+
// safely import a variable regardless of its existence.
|
3
6
|
export default setup('env', () => {
|
4
7
|
return [
|
5
8
|
{
|
6
9
|
type: 'onResolve',
|
7
|
-
filter: /^env
|
10
|
+
filter: /^env(:.+)?$/,
|
8
11
|
callback({ path }) {
|
9
12
|
return { path, namespace: 'env' }
|
10
13
|
}
|
@@ -14,9 +17,27 @@ export default setup('env', () => {
|
|
14
17
|
type: 'onLoad',
|
15
18
|
filter: /.*/,
|
16
19
|
namespace: 'env',
|
17
|
-
callback() {
|
20
|
+
callback({ path }) {
|
21
|
+
if (path.includes(':')) {
|
22
|
+
return {
|
23
|
+
loader: 'js',
|
24
|
+
contents: `export default ${Deno.env.get(path.split(':')[1])}`
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
18
28
|
const env = Deno.env.toObject()
|
19
|
-
|
29
|
+
const contents = []
|
30
|
+
|
31
|
+
for (const key in env) {
|
32
|
+
if (Object.hasOwnProperty.call(env, key)) {
|
33
|
+
contents.push(`export const ${key} = '${env[key]}'`)
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
return {
|
38
|
+
loader: 'js',
|
39
|
+
contents: contents.join(';')
|
40
|
+
}
|
20
41
|
}
|
21
42
|
}
|
22
43
|
]
|
data/lib/proscenium/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proscenium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: x86_64-linux
|
6
6
|
authors:
|
7
7
|
- Joel Moss
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actioncable
|