@medplum/definitions 5.0.0 → 5.0.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/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.mjs.map +3 -3
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var
|
|
1
|
+
"use strict";var a=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var D=(e,r)=>{for(var o in r)a(e,o,{get:r[o],enumerable:!0})},E=(e,r,o,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of p(r))!l.call(e,n)&&n!==o&&a(e,n,{get:()=>r[n],enumerable:!(i=h(r,n))||i.enumerable});return e};var P=e=>E(a({},"__esModule",{value:!0}),e);var S={};D(S,{SEARCH_PARAMETER_BUNDLE_FILES:()=>y,getDataDir:()=>d,readJson:()=>_});module.exports=P(S);var c=require("fs"),m=require("node:fs"),t=require("node:path"),u=require("node:url"),f={};function _(e){let r=(0,t.resolve)(d(),e);return JSON.parse((0,c.readFileSync)(r,"utf8"))}var s;function d(){if(s)return s;let e=g(),r=["./","../","./cjs/","./esm/"];for(let o of r){let i=(0,t.resolve)(e,o),n=(0,t.resolve)(i,"fhir");if((0,m.existsSync)(n))return s=i,i}throw new Error("No data directory found")}function g(){if(typeof __dirname<"u")return(0,t.resolve)(__dirname);if(f.url)return(0,t.resolve)((0,t.dirname)((0,u.fileURLToPath)(f.url)));throw new Error("No data directory found")}var y=["fhir/r4/search-parameters.json","fhir/r4/search-parameters-medplum.json","fhir/r4/search-parameters-uscore.json"];0&&(module.exports={SEARCH_PARAMETER_BUNDLE_FILES,getDataDir,readJson});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors\n// SPDX-License-Identifier: Apache-2.0\nimport { readFileSync } from 'fs';\nimport {
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mCAAAE,EAAA,eAAAC,EAAA,aAAAC,IAAA,eAAAC,EAAAL,GAEA,IAAAM,EAA6B,cAC7BC,
|
|
6
|
-
"names": ["index_exports", "__export", "SEARCH_PARAMETER_BUNDLE_FILES", "getDataDir", "readJson", "__toCommonJS", "import_fs", "import_node_path", "import_node_url", "import_meta", "filename", "
|
|
4
|
+
"sourcesContent": ["// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors\n// SPDX-License-Identifier: Apache-2.0\nimport { readFileSync } from 'fs';\nimport { existsSync } from 'node:fs';\nimport { dirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nexport function readJson(filename: string): any {\n const filenamePath = resolve(getDataDir(), filename);\n return JSON.parse(readFileSync(filenamePath, 'utf8'));\n}\n\nlet cachedDataDir: string | undefined = undefined;\n\nexport function getDataDir(): string {\n if (cachedDataDir) {\n return cachedDataDir;\n }\n\n const currentDir = getCurrentDir();\n\n // Need to handle the following cases:\n // v4 and earlier: `index.js` in `dist/`, data in `dist/fhir/`\n // v5.0.0: data in `index.js` in `dist/cjs/` and `dist/esm/`, data in `/dist/cjs/fhir/` and `/dist/esm/fhir/`\n // v5.0.1 and after: `index.js` in `dist/cjs/` and `dist/esm/`, data back in `/dist/fhir/`\n const relativePaths = ['./', '../', './cjs/', './esm/'];\n for (const relativePath of relativePaths) {\n const fullPath = resolve(currentDir, relativePath);\n const fhirPath = resolve(fullPath, 'fhir');\n if (existsSync(fhirPath)) {\n cachedDataDir = fullPath;\n return fullPath;\n }\n }\n throw new Error('No data directory found');\n}\n\nfunction getCurrentDir(): string {\n if (typeof __dirname !== 'undefined') {\n return resolve(__dirname);\n } else if (import.meta.url) {\n return resolve(dirname(fileURLToPath(import.meta.url)));\n } else {\n throw new Error('No data directory found');\n }\n}\n\n/**\n * The list of all known search parameter definition bundle file paths relative to the\n * `@medplum/definitions` package. Typically used in conjunction with `readJson`.\n */\nexport const SEARCH_PARAMETER_BUNDLE_FILES = [\n 'fhir/r4/search-parameters.json',\n 'fhir/r4/search-parameters-medplum.json',\n 'fhir/r4/search-parameters-uscore.json',\n];\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mCAAAE,EAAA,eAAAC,EAAA,aAAAC,IAAA,eAAAC,EAAAL,GAEA,IAAAM,EAA6B,cAC7BC,EAA2B,mBAC3BC,EAAiC,qBACjCC,EAA8B,oBAL9BC,EAAA,GAOO,SAASN,EAASO,EAAuB,CAC9C,IAAMC,KAAe,WAAQT,EAAW,EAAGQ,CAAQ,EACnD,OAAO,KAAK,SAAM,gBAAaC,EAAc,MAAM,CAAC,CACtD,CAEA,IAAIC,EAEG,SAASV,GAAqB,CACnC,GAAIU,EACF,OAAOA,EAGT,IAAMC,EAAaC,EAAc,EAM3BC,EAAgB,CAAC,KAAM,MAAO,SAAU,QAAQ,EACtD,QAAWC,KAAgBD,EAAe,CACxC,IAAME,KAAW,WAAQJ,EAAYG,CAAY,EAC3CE,KAAW,WAAQD,EAAU,MAAM,EACzC,MAAI,cAAWC,CAAQ,EACrB,OAAAN,EAAgBK,EACTA,CAEX,CACA,MAAM,IAAI,MAAM,yBAAyB,CAC3C,CAEA,SAASH,GAAwB,CAC/B,GAAI,OAAO,UAAc,IACvB,SAAO,WAAQ,SAAS,EACnB,GAAIL,EAAY,IACrB,SAAO,cAAQ,cAAQ,iBAAcA,EAAY,GAAG,CAAC,CAAC,EAEtD,MAAM,IAAI,MAAM,yBAAyB,CAE7C,CAMO,IAAMR,EAAgC,CAC3C,iCACA,yCACA,uCACF",
|
|
6
|
+
"names": ["index_exports", "__export", "SEARCH_PARAMETER_BUNDLE_FILES", "getDataDir", "readJson", "__toCommonJS", "import_fs", "import_node_fs", "import_node_path", "import_node_url", "import_meta", "filename", "filenamePath", "cachedDataDir", "currentDir", "getCurrentDir", "relativePaths", "relativePath", "fullPath", "fhirPath"]
|
|
7
7
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{readFileSync as
|
|
1
|
+
import{readFileSync as s}from"fs";import{existsSync as f}from"node:fs";import{dirname as c,resolve as r}from"node:path";import{fileURLToPath as m}from"node:url";function E(e){let t=r(u(),e);return JSON.parse(s(t,"utf8"))}var o;function u(){if(o)return o;let e=d(),t=["./","../","./cjs/","./esm/"];for(let i of t){let n=r(e,i),a=r(n,"fhir");if(f(a))return o=n,n}throw new Error("No data directory found")}function d(){if(typeof __dirname<"u")return r(__dirname);if(import.meta.url)return r(c(m(import.meta.url)));throw new Error("No data directory found")}var P=["fhir/r4/search-parameters.json","fhir/r4/search-parameters-medplum.json","fhir/r4/search-parameters-uscore.json"];export{P as SEARCH_PARAMETER_BUNDLE_FILES,u as getDataDir,E as readJson};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors\n// SPDX-License-Identifier: Apache-2.0\nimport { readFileSync } from 'fs';\nimport {
|
|
5
|
-
"mappings": "AAEA,OAAS,gBAAAA,MAAoB,KAC7B,OAAS,
|
|
6
|
-
"names": ["readFileSync", "
|
|
4
|
+
"sourcesContent": ["// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors\n// SPDX-License-Identifier: Apache-2.0\nimport { readFileSync } from 'fs';\nimport { existsSync } from 'node:fs';\nimport { dirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nexport function readJson(filename: string): any {\n const filenamePath = resolve(getDataDir(), filename);\n return JSON.parse(readFileSync(filenamePath, 'utf8'));\n}\n\nlet cachedDataDir: string | undefined = undefined;\n\nexport function getDataDir(): string {\n if (cachedDataDir) {\n return cachedDataDir;\n }\n\n const currentDir = getCurrentDir();\n\n // Need to handle the following cases:\n // v4 and earlier: `index.js` in `dist/`, data in `dist/fhir/`\n // v5.0.0: data in `index.js` in `dist/cjs/` and `dist/esm/`, data in `/dist/cjs/fhir/` and `/dist/esm/fhir/`\n // v5.0.1 and after: `index.js` in `dist/cjs/` and `dist/esm/`, data back in `/dist/fhir/`\n const relativePaths = ['./', '../', './cjs/', './esm/'];\n for (const relativePath of relativePaths) {\n const fullPath = resolve(currentDir, relativePath);\n const fhirPath = resolve(fullPath, 'fhir');\n if (existsSync(fhirPath)) {\n cachedDataDir = fullPath;\n return fullPath;\n }\n }\n throw new Error('No data directory found');\n}\n\nfunction getCurrentDir(): string {\n if (typeof __dirname !== 'undefined') {\n return resolve(__dirname);\n } else if (import.meta.url) {\n return resolve(dirname(fileURLToPath(import.meta.url)));\n } else {\n throw new Error('No data directory found');\n }\n}\n\n/**\n * The list of all known search parameter definition bundle file paths relative to the\n * `@medplum/definitions` package. Typically used in conjunction with `readJson`.\n */\nexport const SEARCH_PARAMETER_BUNDLE_FILES = [\n 'fhir/r4/search-parameters.json',\n 'fhir/r4/search-parameters-medplum.json',\n 'fhir/r4/search-parameters-uscore.json',\n];\n"],
|
|
5
|
+
"mappings": "AAEA,OAAS,gBAAAA,MAAoB,KAC7B,OAAS,cAAAC,MAAkB,UAC3B,OAAS,WAAAC,EAAS,WAAAC,MAAe,YACjC,OAAS,iBAAAC,MAAqB,WAEvB,SAASC,EAASC,EAAuB,CAC9C,IAAMC,EAAeJ,EAAQK,EAAW,EAAGF,CAAQ,EACnD,OAAO,KAAK,MAAMN,EAAaO,EAAc,MAAM,CAAC,CACtD,CAEA,IAAIE,EAEG,SAASD,GAAqB,CACnC,GAAIC,EACF,OAAOA,EAGT,IAAMC,EAAaC,EAAc,EAM3BC,EAAgB,CAAC,KAAM,MAAO,SAAU,QAAQ,EACtD,QAAWC,KAAgBD,EAAe,CACxC,IAAME,EAAWX,EAAQO,EAAYG,CAAY,EAC3CE,EAAWZ,EAAQW,EAAU,MAAM,EACzC,GAAIb,EAAWc,CAAQ,EACrB,OAAAN,EAAgBK,EACTA,CAEX,CACA,MAAM,IAAI,MAAM,yBAAyB,CAC3C,CAEA,SAASH,GAAwB,CAC/B,GAAI,OAAO,UAAc,IACvB,OAAOR,EAAQ,SAAS,EACnB,GAAI,YAAY,IACrB,OAAOA,EAAQD,EAAQE,EAAc,YAAY,GAAG,CAAC,CAAC,EAEtD,MAAM,IAAI,MAAM,yBAAyB,CAE7C,CAMO,IAAMY,EAAgC,CAC3C,iCACA,yCACA,uCACF",
|
|
6
|
+
"names": ["readFileSync", "existsSync", "dirname", "resolve", "fileURLToPath", "readJson", "filename", "filenamePath", "getDataDir", "cachedDataDir", "currentDir", "getCurrentDir", "relativePaths", "relativePath", "fullPath", "fhirPath", "SEARCH_PARAMETER_BUNDLE_FILES"]
|
|
7
7
|
}
|