@medplum/core 2.1.12 → 2.1.14
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/babel.config.cjs +20 -0
- package/dist/cjs/index.cjs +4 -4
- package/dist/cjs/index.cjs.map +2 -2
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/index.mjs.map +2 -2
- package/dist/types.d.ts +37 -24
- package/package.json +4 -1
package/babel.config.cjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'],
|
|
3
|
+
plugins: [
|
|
4
|
+
function () {
|
|
5
|
+
return {
|
|
6
|
+
visitor: {
|
|
7
|
+
MetaProperty(path) {
|
|
8
|
+
// replace e.g. import.meta.env.GOOGLE_AUTH_ORIGINS into process.env.GOOGLE_AUTH_ORIGINS
|
|
9
|
+
const metaProperty = path.node;
|
|
10
|
+
|
|
11
|
+
if (metaProperty.meta.name === 'import' && metaProperty.property.name === 'meta') {
|
|
12
|
+
// We're specifically looking for instances of `import.meta` so ignore any other meta properties.
|
|
13
|
+
path.replaceWithSourceString('process');
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
};
|