arangojs 8.1.0 → 8.2.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/CHANGELOG.md +29 -0
- package/collection.d.ts.map +1 -1
- package/collection.js +4 -0
- package/collection.js.map +1 -1
- package/indexes.d.ts.map +1 -1
- package/indexes.js +3 -2
- package/indexes.js.map +1 -1
- package/lib/querystringify.d.ts +1 -3
- package/lib/querystringify.d.ts.map +1 -1
- package/lib/querystringify.js +12 -11
- package/lib/querystringify.js.map +1 -1
- package/lib/request.web.d.ts.map +1 -1
- package/lib/request.web.js +7 -4
- package/lib/request.web.js.map +1 -1
- package/package.json +1 -1
- package/web.js +1 -1
- package/web.js.map +1 -1
package/indexes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexes.d.ts","sourceRoot":"","sources":["../src/indexes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AAEzE;;GAEG;AACH,oBAAY,4BAA4B,GAAG;IACzC;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;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,GACR,aAAa,GACb,eAAe,GACf,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,aAAa,CAAC;AAElB,oBAAY,YAAY,GAAG;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,oBAAY,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,MAAM,CAAC;AAEnE;;GAEG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,aAAa,EACvB,cAAc,EAAE,MAAM,GACrB,MAAM,CAqBR"}
|
package/indexes.js
CHANGED
|
@@ -33,9 +33,10 @@ function _indexHandle(selector, collectionName) {
|
|
|
33
33
|
if (normalizedHead !== collectionName) {
|
|
34
34
|
throw new Error(`Index ID "${selector}" does not match collection name "${collectionName}"`);
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
selector = tail.join("/").normalize("NFC");
|
|
37
|
+
return [normalizedHead, selector].join("/");
|
|
37
38
|
}
|
|
38
|
-
return `${collectionName}/${selector}`;
|
|
39
|
+
return `${collectionName}/${String(selector).normalize("NFC")}`;
|
|
39
40
|
}
|
|
40
41
|
exports._indexHandle = _indexHandle;
|
|
41
42
|
//# sourceMappingURL=indexes.js.map
|
package/indexes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexes.js","sourceRoot":"","sources":["../src/indexes.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAypBH;;GAEG;AACH,SAAgB,YAAY,CAC1B,QAAuB,EACvB,cAAsB;IAEtB,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAChC,IAAI,QAAQ,CAAC,EAAE,EAAE;YACf,OAAO,YAAY,CAAC,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;SAClD;QACD,MAAM,IAAI,KAAK,CACb,iEAAiE,CAClE,CAAC;KACH;IACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC1B,MAAM,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5C,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,IAAI,cAAc,KAAK,cAAc,EAAE;YACrC,MAAM,IAAI,KAAK,CACb,aAAa,QAAQ,qCAAqC,cAAc,GAAG,CAC5E,CAAC;SACH;QACD,OAAO,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC5C;IACD,OAAO,GAAG,cAAc,IAAI,QAAQ,EAAE,CAAC;AACzC,CAAC;AAvBD,oCAuBC","sourcesContent":["/**\n * ```ts\n * import type {\n * FulltextIndex,\n * GeoIndex,\n * PersistentIndex,\n * PrimaryIndex,\n * TtlIndex,\n * ZkdIndex,\n * } from \"arangojs/indexes\";\n * ```\n *\n * The \"indexes\" module provides index-related types for TypeScript.\n *\n * @packageDocumentation\n */\n\nimport { AnalyzerFeature } from \"./analyzer\";\nimport { Compression, Direction, TierConsolidationPolicy } from \"./view\";\n\n/**\n * Options for creating a persistent index.\n */\nexport type EnsurePersistentIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"persistent\";\n /**\n * An array of attribute paths.\n */\n fields: string[];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, a unique index will be created.\n *\n * Default: `false`\n */\n unique?: boolean;\n /**\n * If set to `true`, the index will omit documents that do not contain at\n * least one of the attribute paths in `fields` and these documents will be\n * ignored for uniqueness checks.\n *\n * Default: `false`\n */\n sparse?: boolean;\n /**\n * If set to `false`, inserting duplicate index values from the same\n * document will lead to a unique constraint error if this is a unique index.\n *\n * Default: `true`\n */\n deduplicate?: boolean;\n /**\n * If set to `false`, index selectivity estimates will be disabled for this\n * index.\n *\n * Default: `true`\n */\n estimates?: boolean;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n /**\n * If set to `true`, an in-memory hash cache will be put in front of the\n * persistent index.\n *\n * Default: `false`\n */\n cacheEnabled?: boolean;\n /**\n * An array of attribute paths that will be stored in the index but can not\n * be used for index lookups or sorting but can avoid full document lookups.\n */\n storedValues?: string[];\n};\n\n/**\n * Options for creating a geo index.\n */\nexport type EnsureGeoIndexOptions =\n | {\n type: \"geo\";\n /**\n * If set to `true`, `fields` must be an array containing a single attribute\n * path and the attribute value must be an array with two values, the first\n * of which will be interpreted as the longitude and the second of which will\n * be interpreted as the latitude of the document.\n *\n * Default: `false`\n */\n geoJson?: false;\n /**\n * If set to `true`, the index will use pre-3.10 rules for parsing\n * GeoJSON polygons. This option is always implicitly `true` when using\n * ArangoDB 3.9 or lower.\n */\n legacyPolygons?: boolean;\n /**\n * Attribute paths for the document's latitude and longitude values.\n */\n fields: [string, string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n }\n | {\n type: \"geo\";\n /**\n * If set to `true`, `fields` must be an array containing a single attribute\n * path and the attribute value must be an array with two values, the first\n * of which will be interpreted as the longitude and the second of which will\n * be interpreted as the latitude of the document.\n *\n * Default: `false`\n */\n geoJson?: boolean;\n /**\n * If set to `true`, the index will use pre-3.10 rules for parsing\n * GeoJSON polygons. This option is always implicitly `true` when using\n * ArangoDB 3.9 or lower.\n */\n legacyPolygons?: boolean;\n /**\n * An array containing the attribute path for an array containing two values,\n * the first of which will be interpreted as the latitude, the second as the\n * longitude. If `geoJson` is set to `true`, the order is reversed to match\n * the GeoJSON format.\n */\n fields: [string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n };\n\n/**\n * Options for creating a fulltext index.\n *\n * @deprecated Fulltext indexes have been deprecated in ArangoDB 3.10 and\n * should be replaced with ArangoSearch.\n */\nexport type EnsureFulltextIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"fulltext\";\n /**\n * An array containing exactly one attribute path.\n */\n fields: [string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * Minimum character length of words to index.\n */\n minLength?: number;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * Options for creating a TTL index.\n */\nexport type EnsureTtlIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"ttl\";\n /**\n * An array containing exactly one attribute path.\n */\n fields: [string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * Duration in seconds after the attribute value at which the document will\n * be considered as expired.\n */\n expireAfter: number;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * Options for creating a ZKD index.\n */\nexport type EnsureZkdIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"zkd\";\n /**\n * An array containing attribute paths for the dimensions.\n */\n fields: string[];\n /**\n * Data type of the dimension attributes.\n */\n fieldValueTypes: \"double\";\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, a unique index will be created.\n *\n * Default: `false`\n */\n unique?: boolean;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * (Enterprise Edition only.) Options for a nested field in an inverted index.\n */\nexport type InvertedIndexNestedFieldOptions = {\n /**\n * An attribute path.\n */\n name: string;\n /**\n * Name of the Analyzer to apply to the values of this field.\n *\n * Defaults to the `analyzer` specified on the parent options or on the index\n * itself.\n */\n analyzer?: string;\n /**\n * List of Analyzer features to enable for this field's Analyzer.\n *\n * Defaults to the features of the Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * If set to `true` array values will be indexed using the same behavior as\n * ArangoSearch Views. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Defaults to the value of `searchField` specified on the index itself.\n */\n searchField?: boolean;\n /**\n * Sub-objects to index to allow querying for co-occurring values.\n */\n nested?: (string | InvertedIndexNestedFieldOptions)[];\n};\n\n/**\n * Options for an attribute path in an inverted index.\n */\nexport type InvertedIndexFieldOptions = {\n /**\n * An attribute path.\n */\n name: string;\n /**\n * Name of the Analyzer to apply to the values of this field.\n *\n * Defaults to the `analyzer` specified on the index itself.\n */\n analyzer?: string;\n /**\n * List of Analyzer features to enable for this field's Analyzer.\n *\n * Defaults to the features of the Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * If set to `true`, all document attributes are indexed, excluding any\n * sub-attributes configured in the `fields` array. The `analyzer` and\n * `features` properties apply to the sub-attributes. This option only\n * applies when using the index in a SearchAlias View.\n *\n * Defaults to the value of `includeAllFields` specified on the index itself.\n */\n includeAllFields?: boolean;\n /**\n * If set to `true` array values will be indexed using the same behavior as\n * ArangoSearch Views. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Defaults to the value of `searchField` specified on the index itself.\n */\n searchField?: boolean;\n /**\n * If set to `true`, the position of values in array values are tracked and\n * need to be specified in queries. Otherwise all values in an array are\n * treated as equivalent. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Defaults to the value of `trackListPositions` specified on the index\n * itself.\n */\n trackListPositions?: boolean;\n /**\n * (Enterprise Edition only.) Sub-objects to index to allow querying for\n * co-occurring values.\n */\n nested?: (string | InvertedIndexNestedFieldOptions)[];\n};\n\n/**\n * Options for defining a stored value on an inverted index.\n */\nexport type InvertedIndexStoredValueOptions = {\n /**\n * The attribute paths to store.\n */\n fields: string[];\n /**\n * How the attribute values should be compressed.\n *\n * Default: `\"lz4\"`\n */\n compression?: Compression;\n};\n\n/**\n * Options for defining a primary sort field on an inverted index.\n */\nexport type InvertedIndexPrimarySortFieldOptions = {\n /**\n * The attribute path to sort by.\n */\n field: string;\n /**\n * The sorting direction.\n */\n direction: Direction;\n};\n\n/**\n * Options for creating an inverted index.\n */\nexport type EnsureInvertedIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"inverted\";\n /**\n * An array of attribute paths or objects specifying options for the fields.\n */\n fields: (string | InvertedIndexFieldOptions)[];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true` array values will by default be indexed using the same\n * behavior as ArangoSearch Views. This option only applies when using the\n * index in a SearchAlias View.\n *\n * Default: `false`\n */\n searchField?: boolean;\n /**\n * An array of attribute paths that will be stored in the index but can not\n * be used for index lookups or sorting but can avoid full document lookups.\n */\n storedValues?: InvertedIndexStoredValueOptions[];\n /**\n * Primary sort order to optimize AQL queries using a matching sort order.\n */\n primarySort?: {\n /**\n * An array of fields to sort the index by.\n */\n fields: InvertedIndexPrimarySortFieldOptions[];\n /**\n * How the primary sort data should be compressed.\n *\n * Default: `\"lz4\"`\n */\n compression?: Compression;\n };\n /**\n * Name of the default Analyzer to apply to the values of indexed fields.\n *\n * Default: `\"identity\"`\n */\n analyzer?: string;\n /**\n * List of Analyzer features to enable for the default Analyzer.\n *\n * Defaults to the Analyzer's features.\n */\n features?: AnalyzerFeature[];\n /**\n * If set to `true`, all document attributes are indexed, excluding any\n * sub-attributes configured in the `fields` array. The `analyzer` and\n * `features` properties apply to the sub-attributes. This option only\n * applies when using the index in a SearchAlias View.\n *\n * Default: `false`\n */\n includeAllFields?: boolean;\n /**\n * If set to `true`, the position of values in array values are tracked and\n * need to be specified in queries. Otherwise all values in an array are\n * treated as equivalent. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Default: `false`\n */\n trackListPositions?: boolean;\n /**\n * The number of threads to use for indexing the fields.\n *\n * Default: `2`\n */\n parallelism?: number;\n /**\n * Wait at least this many commits between removing unused files in the\n * ArangoSearch data directory.\n *\n * Default: `2`\n */\n cleanupIntervalStep?: number;\n /**\n * Wait at least this many milliseconds between committing View data store\n * changes and making documents visible to queries.\n *\n * Default: `1000`\n */\n commitIntervalMsec?: number;\n /**\n * Wait at least this many milliseconds between applying\n * `consolidationPolicy` to consolidate View data store and possibly release\n * space on the filesystem.\n *\n * Default: `1000`\n */\n consolidationIntervalMsec?: number;\n /**\n * The consolidation policy to apply for selecting which segments should be\n * merged.\n *\n * Default: `{ type: \"tier\" }`\n */\n consolidationPolicy?: TierConsolidationPolicy;\n /**\n * Maximum number of writers (segments) cached in the pool.\n *\n * Default: `64`\n */\n writeBufferIdle?: number;\n /**\n * Maximum number of concurrent active writers (segments) that perform a\n * transaction.\n *\n * Default: `0` (disabled)\n */\n writeBufferActive?: number;\n /**\n * Maximum memory byte size per writer (segment) before a writer (segment)\n * flush is triggered.\n *\n * Default: `33554432` (32 MiB)\n */\n writeBufferSizeMax?: number;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * Shared attributes of all index types.\n */\nexport type GenericIndex = {\n /**\n * A unique name for this index.\n */\n name: string;\n /**\n * A unique identifier for this index.\n */\n id: string;\n /**\n * Whether documents not containing at least one of the attribute paths\n * are omitted by this index.\n */\n sparse: boolean;\n /**\n * Whether this index enforces uniqueness for values of its attribute paths.\n */\n unique: boolean;\n};\n\n/**\n * An object representing a persistent index.\n */\nexport type PersistentIndex = GenericIndex & {\n type: \"persistent\";\n fields: string[];\n cacheEnabled: boolean;\n deduplicate: boolean;\n estimates: boolean;\n storedValues?: string[];\n};\n\n/**\n * An object representing a primary index.\n */\nexport type PrimaryIndex = GenericIndex & {\n type: \"primary\";\n fields: string[];\n selectivityEstimate: number;\n};\n\n/**\n * An object representing a fulltext index.\n *\n * @deprecated Fulltext indexes have been deprecated in ArangoDB 3.10 and\n * should be replaced with ArangoSearch.\n */\nexport type FulltextIndex = GenericIndex & {\n type: \"fulltext\";\n fields: [string];\n minLength: number;\n};\n\n/**\n * An object representing a geo index.\n */\nexport type GeoIndex = GenericIndex & {\n type: \"geo\";\n fields: [string] | [string, string];\n geoJson: boolean;\n legacyPolygons: boolean;\n bestIndexedLevel: number;\n worstIndexedLevel: number;\n maxNumCoverCells: number;\n};\n\n/**\n * An object representing a TTL index.\n */\nexport type TtlIndex = GenericIndex & {\n type: \"ttl\";\n fields: [string];\n expireAfter: number;\n selectivityEstimate: number;\n};\n\n/**\n * An object representing a ZKD index.\n */\nexport type ZkdIndex = GenericIndex & {\n type: \"zkd\";\n fields: string[];\n fieldValueTypes: \"double\";\n};\n\n/**\n * (Enterprise Edition only.) An object representing a nested field in an\n * inverted index.\n */\nexport type InvertedIndexNestedField = {\n name: string;\n analyzer?: string;\n features?: AnalyzerFeature[];\n searchField?: boolean;\n nested?: InvertedIndexNestedField[];\n};\n\n/**\n * An object representing an inverted index.\n */\nexport type InvertedIndex = GenericIndex & {\n type: \"inverted\";\n fields: {\n name: string;\n analyzer?: string;\n features?: AnalyzerFeature[];\n includeAllFields?: boolean;\n searchField?: boolean;\n trackListPositions?: boolean;\n nested?: InvertedIndexNestedField[];\n }[];\n searchField: boolean;\n storedValues: {\n fields: string[];\n compression: Compression;\n }[];\n primarySort: {\n fields: {\n field: string;\n direction: Direction;\n }[];\n compression: Compression;\n };\n analyzer: string;\n features: AnalyzerFeature[];\n includeAllFields: boolean;\n trackListPositions: boolean;\n parallelism: number;\n cleanupIntervalStep: number;\n commitIntervalMsec: number;\n consolidationIntervalMsec: number;\n consolidationPolicy: Required<TierConsolidationPolicy>;\n writeBufferIdle: number;\n writeBufferActive: number;\n writeBufferSizeMax: number;\n};\n\n/**\n * An object representing an index.\n */\nexport type Index =\n | GeoIndex\n | FulltextIndex\n | PersistentIndex\n | PrimaryIndex\n | TtlIndex\n | ZkdIndex\n | InvertedIndex;\n\nexport type ObjectWithId = {\n [key: string]: any;\n id: string;\n};\n\nexport type ObjectWithName = {\n [key: string]: any;\n name: string;\n};\n\n/**\n * Index name, id or object with a `name` or `id` property.\n */\nexport type IndexSelector = ObjectWithId | ObjectWithName | string;\n\n/**\n * @internal\n */\nexport function _indexHandle(\n selector: IndexSelector,\n collectionName: string\n): string {\n if (typeof selector !== \"string\") {\n if (selector.id) {\n return _indexHandle(selector.id, collectionName);\n }\n throw new Error(\n \"Index handle must be a string or an object with an id attribute\"\n );\n }\n if (selector.includes(\"/\")) {\n const [head, ...tail] = selector.split(\"/\");\n const normalizedHead = head.normalize(\"NFC\");\n if (normalizedHead !== collectionName) {\n throw new Error(\n `Index ID \"${selector}\" does not match collection name \"${collectionName}\"`\n );\n }\n return [normalizedHead, ...tail].join(\"/\");\n }\n return `${collectionName}/${selector}`;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"indexes.js","sourceRoot":"","sources":["../src/indexes.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAypBH;;GAEG;AACH,SAAgB,YAAY,CAC1B,QAAuB,EACvB,cAAsB;IAEtB,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAChC,IAAI,QAAQ,CAAC,EAAE,EAAE;YACf,OAAO,YAAY,CAAC,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;SAClD;QACD,MAAM,IAAI,KAAK,CACb,iEAAiE,CAClE,CAAC;KACH;IACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC1B,MAAM,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5C,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,IAAI,cAAc,KAAK,cAAc,EAAE;YACrC,MAAM,IAAI,KAAK,CACb,aAAa,QAAQ,qCAAqC,cAAc,GAAG,CAC5E,CAAC;SACH;QACD,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC3C,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC7C;IACD,OAAO,GAAG,cAAc,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;AAClE,CAAC;AAxBD,oCAwBC","sourcesContent":["/**\n * ```ts\n * import type {\n * FulltextIndex,\n * GeoIndex,\n * PersistentIndex,\n * PrimaryIndex,\n * TtlIndex,\n * ZkdIndex,\n * } from \"arangojs/indexes\";\n * ```\n *\n * The \"indexes\" module provides index-related types for TypeScript.\n *\n * @packageDocumentation\n */\n\nimport { AnalyzerFeature } from \"./analyzer\";\nimport { Compression, Direction, TierConsolidationPolicy } from \"./view\";\n\n/**\n * Options for creating a persistent index.\n */\nexport type EnsurePersistentIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"persistent\";\n /**\n * An array of attribute paths.\n */\n fields: string[];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, a unique index will be created.\n *\n * Default: `false`\n */\n unique?: boolean;\n /**\n * If set to `true`, the index will omit documents that do not contain at\n * least one of the attribute paths in `fields` and these documents will be\n * ignored for uniqueness checks.\n *\n * Default: `false`\n */\n sparse?: boolean;\n /**\n * If set to `false`, inserting duplicate index values from the same\n * document will lead to a unique constraint error if this is a unique index.\n *\n * Default: `true`\n */\n deduplicate?: boolean;\n /**\n * If set to `false`, index selectivity estimates will be disabled for this\n * index.\n *\n * Default: `true`\n */\n estimates?: boolean;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n /**\n * If set to `true`, an in-memory hash cache will be put in front of the\n * persistent index.\n *\n * Default: `false`\n */\n cacheEnabled?: boolean;\n /**\n * An array of attribute paths that will be stored in the index but can not\n * be used for index lookups or sorting but can avoid full document lookups.\n */\n storedValues?: string[];\n};\n\n/**\n * Options for creating a geo index.\n */\nexport type EnsureGeoIndexOptions =\n | {\n type: \"geo\";\n /**\n * If set to `true`, `fields` must be an array containing a single attribute\n * path and the attribute value must be an array with two values, the first\n * of which will be interpreted as the longitude and the second of which will\n * be interpreted as the latitude of the document.\n *\n * Default: `false`\n */\n geoJson?: false;\n /**\n * If set to `true`, the index will use pre-3.10 rules for parsing\n * GeoJSON polygons. This option is always implicitly `true` when using\n * ArangoDB 3.9 or lower.\n */\n legacyPolygons?: boolean;\n /**\n * Attribute paths for the document's latitude and longitude values.\n */\n fields: [string, string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n }\n | {\n type: \"geo\";\n /**\n * If set to `true`, `fields` must be an array containing a single attribute\n * path and the attribute value must be an array with two values, the first\n * of which will be interpreted as the longitude and the second of which will\n * be interpreted as the latitude of the document.\n *\n * Default: `false`\n */\n geoJson?: boolean;\n /**\n * If set to `true`, the index will use pre-3.10 rules for parsing\n * GeoJSON polygons. This option is always implicitly `true` when using\n * ArangoDB 3.9 or lower.\n */\n legacyPolygons?: boolean;\n /**\n * An array containing the attribute path for an array containing two values,\n * the first of which will be interpreted as the latitude, the second as the\n * longitude. If `geoJson` is set to `true`, the order is reversed to match\n * the GeoJSON format.\n */\n fields: [string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n };\n\n/**\n * Options for creating a fulltext index.\n *\n * @deprecated Fulltext indexes have been deprecated in ArangoDB 3.10 and\n * should be replaced with ArangoSearch.\n */\nexport type EnsureFulltextIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"fulltext\";\n /**\n * An array containing exactly one attribute path.\n */\n fields: [string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * Minimum character length of words to index.\n */\n minLength?: number;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * Options for creating a TTL index.\n */\nexport type EnsureTtlIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"ttl\";\n /**\n * An array containing exactly one attribute path.\n */\n fields: [string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * Duration in seconds after the attribute value at which the document will\n * be considered as expired.\n */\n expireAfter: number;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * Options for creating a ZKD index.\n */\nexport type EnsureZkdIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"zkd\";\n /**\n * An array containing attribute paths for the dimensions.\n */\n fields: string[];\n /**\n * Data type of the dimension attributes.\n */\n fieldValueTypes: \"double\";\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, a unique index will be created.\n *\n * Default: `false`\n */\n unique?: boolean;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * (Enterprise Edition only.) Options for a nested field in an inverted index.\n */\nexport type InvertedIndexNestedFieldOptions = {\n /**\n * An attribute path.\n */\n name: string;\n /**\n * Name of the Analyzer to apply to the values of this field.\n *\n * Defaults to the `analyzer` specified on the parent options or on the index\n * itself.\n */\n analyzer?: string;\n /**\n * List of Analyzer features to enable for this field's Analyzer.\n *\n * Defaults to the features of the Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * If set to `true` array values will be indexed using the same behavior as\n * ArangoSearch Views. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Defaults to the value of `searchField` specified on the index itself.\n */\n searchField?: boolean;\n /**\n * Sub-objects to index to allow querying for co-occurring values.\n */\n nested?: (string | InvertedIndexNestedFieldOptions)[];\n};\n\n/**\n * Options for an attribute path in an inverted index.\n */\nexport type InvertedIndexFieldOptions = {\n /**\n * An attribute path.\n */\n name: string;\n /**\n * Name of the Analyzer to apply to the values of this field.\n *\n * Defaults to the `analyzer` specified on the index itself.\n */\n analyzer?: string;\n /**\n * List of Analyzer features to enable for this field's Analyzer.\n *\n * Defaults to the features of the Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * If set to `true`, all document attributes are indexed, excluding any\n * sub-attributes configured in the `fields` array. The `analyzer` and\n * `features` properties apply to the sub-attributes. This option only\n * applies when using the index in a SearchAlias View.\n *\n * Defaults to the value of `includeAllFields` specified on the index itself.\n */\n includeAllFields?: boolean;\n /**\n * If set to `true` array values will be indexed using the same behavior as\n * ArangoSearch Views. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Defaults to the value of `searchField` specified on the index itself.\n */\n searchField?: boolean;\n /**\n * If set to `true`, the position of values in array values are tracked and\n * need to be specified in queries. Otherwise all values in an array are\n * treated as equivalent. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Defaults to the value of `trackListPositions` specified on the index\n * itself.\n */\n trackListPositions?: boolean;\n /**\n * (Enterprise Edition only.) Sub-objects to index to allow querying for\n * co-occurring values.\n */\n nested?: (string | InvertedIndexNestedFieldOptions)[];\n};\n\n/**\n * Options for defining a stored value on an inverted index.\n */\nexport type InvertedIndexStoredValueOptions = {\n /**\n * The attribute paths to store.\n */\n fields: string[];\n /**\n * How the attribute values should be compressed.\n *\n * Default: `\"lz4\"`\n */\n compression?: Compression;\n};\n\n/**\n * Options for defining a primary sort field on an inverted index.\n */\nexport type InvertedIndexPrimarySortFieldOptions = {\n /**\n * The attribute path to sort by.\n */\n field: string;\n /**\n * The sorting direction.\n */\n direction: Direction;\n};\n\n/**\n * Options for creating an inverted index.\n */\nexport type EnsureInvertedIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"inverted\";\n /**\n * An array of attribute paths or objects specifying options for the fields.\n */\n fields: (string | InvertedIndexFieldOptions)[];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true` array values will by default be indexed using the same\n * behavior as ArangoSearch Views. This option only applies when using the\n * index in a SearchAlias View.\n *\n * Default: `false`\n */\n searchField?: boolean;\n /**\n * An array of attribute paths that will be stored in the index but can not\n * be used for index lookups or sorting but can avoid full document lookups.\n */\n storedValues?: InvertedIndexStoredValueOptions[];\n /**\n * Primary sort order to optimize AQL queries using a matching sort order.\n */\n primarySort?: {\n /**\n * An array of fields to sort the index by.\n */\n fields: InvertedIndexPrimarySortFieldOptions[];\n /**\n * How the primary sort data should be compressed.\n *\n * Default: `\"lz4\"`\n */\n compression?: Compression;\n };\n /**\n * Name of the default Analyzer to apply to the values of indexed fields.\n *\n * Default: `\"identity\"`\n */\n analyzer?: string;\n /**\n * List of Analyzer features to enable for the default Analyzer.\n *\n * Defaults to the Analyzer's features.\n */\n features?: AnalyzerFeature[];\n /**\n * If set to `true`, all document attributes are indexed, excluding any\n * sub-attributes configured in the `fields` array. The `analyzer` and\n * `features` properties apply to the sub-attributes. This option only\n * applies when using the index in a SearchAlias View.\n *\n * Default: `false`\n */\n includeAllFields?: boolean;\n /**\n * If set to `true`, the position of values in array values are tracked and\n * need to be specified in queries. Otherwise all values in an array are\n * treated as equivalent. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Default: `false`\n */\n trackListPositions?: boolean;\n /**\n * The number of threads to use for indexing the fields.\n *\n * Default: `2`\n */\n parallelism?: number;\n /**\n * Wait at least this many commits between removing unused files in the\n * ArangoSearch data directory.\n *\n * Default: `2`\n */\n cleanupIntervalStep?: number;\n /**\n * Wait at least this many milliseconds between committing View data store\n * changes and making documents visible to queries.\n *\n * Default: `1000`\n */\n commitIntervalMsec?: number;\n /**\n * Wait at least this many milliseconds between applying\n * `consolidationPolicy` to consolidate View data store and possibly release\n * space on the filesystem.\n *\n * Default: `1000`\n */\n consolidationIntervalMsec?: number;\n /**\n * The consolidation policy to apply for selecting which segments should be\n * merged.\n *\n * Default: `{ type: \"tier\" }`\n */\n consolidationPolicy?: TierConsolidationPolicy;\n /**\n * Maximum number of writers (segments) cached in the pool.\n *\n * Default: `64`\n */\n writeBufferIdle?: number;\n /**\n * Maximum number of concurrent active writers (segments) that perform a\n * transaction.\n *\n * Default: `0` (disabled)\n */\n writeBufferActive?: number;\n /**\n * Maximum memory byte size per writer (segment) before a writer (segment)\n * flush is triggered.\n *\n * Default: `33554432` (32 MiB)\n */\n writeBufferSizeMax?: number;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * Shared attributes of all index types.\n */\nexport type GenericIndex = {\n /**\n * A unique name for this index.\n */\n name: string;\n /**\n * A unique identifier for this index.\n */\n id: string;\n /**\n * Whether documents not containing at least one of the attribute paths\n * are omitted by this index.\n */\n sparse: boolean;\n /**\n * Whether this index enforces uniqueness for values of its attribute paths.\n */\n unique: boolean;\n};\n\n/**\n * An object representing a persistent index.\n */\nexport type PersistentIndex = GenericIndex & {\n type: \"persistent\";\n fields: string[];\n cacheEnabled: boolean;\n deduplicate: boolean;\n estimates: boolean;\n storedValues?: string[];\n};\n\n/**\n * An object representing a primary index.\n */\nexport type PrimaryIndex = GenericIndex & {\n type: \"primary\";\n fields: string[];\n selectivityEstimate: number;\n};\n\n/**\n * An object representing a fulltext index.\n *\n * @deprecated Fulltext indexes have been deprecated in ArangoDB 3.10 and\n * should be replaced with ArangoSearch.\n */\nexport type FulltextIndex = GenericIndex & {\n type: \"fulltext\";\n fields: [string];\n minLength: number;\n};\n\n/**\n * An object representing a geo index.\n */\nexport type GeoIndex = GenericIndex & {\n type: \"geo\";\n fields: [string] | [string, string];\n geoJson: boolean;\n legacyPolygons: boolean;\n bestIndexedLevel: number;\n worstIndexedLevel: number;\n maxNumCoverCells: number;\n};\n\n/**\n * An object representing a TTL index.\n */\nexport type TtlIndex = GenericIndex & {\n type: \"ttl\";\n fields: [string];\n expireAfter: number;\n selectivityEstimate: number;\n};\n\n/**\n * An object representing a ZKD index.\n */\nexport type ZkdIndex = GenericIndex & {\n type: \"zkd\";\n fields: string[];\n fieldValueTypes: \"double\";\n};\n\n/**\n * (Enterprise Edition only.) An object representing a nested field in an\n * inverted index.\n */\nexport type InvertedIndexNestedField = {\n name: string;\n analyzer?: string;\n features?: AnalyzerFeature[];\n searchField?: boolean;\n nested?: InvertedIndexNestedField[];\n};\n\n/**\n * An object representing an inverted index.\n */\nexport type InvertedIndex = GenericIndex & {\n type: \"inverted\";\n fields: {\n name: string;\n analyzer?: string;\n features?: AnalyzerFeature[];\n includeAllFields?: boolean;\n searchField?: boolean;\n trackListPositions?: boolean;\n nested?: InvertedIndexNestedField[];\n }[];\n searchField: boolean;\n storedValues: {\n fields: string[];\n compression: Compression;\n }[];\n primarySort: {\n fields: {\n field: string;\n direction: Direction;\n }[];\n compression: Compression;\n };\n analyzer: string;\n features: AnalyzerFeature[];\n includeAllFields: boolean;\n trackListPositions: boolean;\n parallelism: number;\n cleanupIntervalStep: number;\n commitIntervalMsec: number;\n consolidationIntervalMsec: number;\n consolidationPolicy: Required<TierConsolidationPolicy>;\n writeBufferIdle: number;\n writeBufferActive: number;\n writeBufferSizeMax: number;\n};\n\n/**\n * An object representing an index.\n */\nexport type Index =\n | GeoIndex\n | FulltextIndex\n | PersistentIndex\n | PrimaryIndex\n | TtlIndex\n | ZkdIndex\n | InvertedIndex;\n\nexport type ObjectWithId = {\n [key: string]: any;\n id: string;\n};\n\nexport type ObjectWithName = {\n [key: string]: any;\n name: string;\n};\n\n/**\n * Index name, id or object with a `name` or `id` property.\n */\nexport type IndexSelector = ObjectWithId | ObjectWithName | string;\n\n/**\n * @internal\n */\nexport function _indexHandle(\n selector: IndexSelector,\n collectionName: string\n): string {\n if (typeof selector !== \"string\") {\n if (selector.id) {\n return _indexHandle(selector.id, collectionName);\n }\n throw new Error(\n \"Index handle must be a string or an object with an id attribute\"\n );\n }\n if (selector.includes(\"/\")) {\n const [head, ...tail] = selector.split(\"/\");\n const normalizedHead = head.normalize(\"NFC\");\n if (normalizedHead !== collectionName) {\n throw new Error(\n `Index ID \"${selector}\" does not match collection name \"${collectionName}\"`\n );\n }\n selector = tail.join(\"/\").normalize(\"NFC\");\n return [normalizedHead, selector].join(\"/\");\n }\n return `${collectionName}/${String(selector).normalize(\"NFC\")}`;\n}\n"]}
|
package/lib/querystringify.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { ParsedUrlQueryInput } from "querystring";
|
|
3
|
-
export declare function querystringify(obj: ParsedUrlQueryInput): string;
|
|
1
|
+
export declare function querystringify(obj: Record<string, any>): string;
|
|
4
2
|
//# sourceMappingURL=querystringify.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"querystringify.d.ts","sourceRoot":"","sources":["../../src/lib/querystringify.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"querystringify.d.ts","sourceRoot":"","sources":["../../src/lib/querystringify.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,UAatD"}
|
package/lib/querystringify.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.querystringify = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const result = {};
|
|
8
|
-
for (const key of Object.keys(obj)) {
|
|
9
|
-
const value = obj[key];
|
|
4
|
+
function querystringify(obj) {
|
|
5
|
+
const params = new URLSearchParams();
|
|
6
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
10
7
|
if (value === undefined)
|
|
11
8
|
continue;
|
|
12
|
-
|
|
9
|
+
if (!Array.isArray(value)) {
|
|
10
|
+
params.append(key, value);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
for (const item of value) {
|
|
14
|
+
params.append(key, item);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
13
17
|
}
|
|
14
|
-
return
|
|
15
|
-
}
|
|
16
|
-
function querystringify(obj) {
|
|
17
|
-
return (0, querystring_1.stringify)(clean(obj));
|
|
18
|
+
return String(params);
|
|
18
19
|
}
|
|
19
20
|
exports.querystringify = querystringify;
|
|
20
21
|
//# sourceMappingURL=querystringify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"querystringify.js","sourceRoot":"","sources":["../../src/lib/querystringify.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"querystringify.js","sourceRoot":"","sources":["../../src/lib/querystringify.ts"],"names":[],"mappings":";;;AAAA,SAAgB,cAAc,CAAC,GAAwB;IACrD,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;IACrC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QAC9C,IAAI,KAAK,KAAK,SAAS;YAAE,SAAS;QAClC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACzB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAC3B;aAAM;YACL,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;gBACxB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;aAC1B;SACF;KACF;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAbD,wCAaC","sourcesContent":["export function querystringify(obj: Record<string, any>) {\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(obj)) {\n if (value === undefined) continue;\n if (!Array.isArray(value)) {\n params.append(key, value);\n } else {\n for (const item of value) {\n params.append(key, item);\n }\n }\n }\n return String(params);\n}\n"]}
|
package/lib/request.web.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.web.d.ts","sourceRoot":"","sources":["../../src/lib/request.web.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAEL,gBAAgB,EAChB,cAAc,EACf,MAAM,gBAAgB,CAAC;AAGxB,eAAO,MAAM,SAAS,OAAO,CAAC;AAY9B;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,UAAU,GAAG,mBAAmB,oEAezC,cAAc,MACb,QAAQ,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"request.web.d.ts","sourceRoot":"","sources":["../../src/lib/request.web.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAEL,gBAAgB,EAChB,cAAc,EACf,MAAM,gBAAgB,CAAC;AAGxB,eAAO,MAAM,SAAS,OAAO,CAAC;AAY9B;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,UAAU,GAAG,mBAAmB,oEAezC,cAAc,MACb,QAAQ,gBAAgB,CAAC,UAmDhC"}
|
package/lib/request.web.js
CHANGED
|
@@ -34,11 +34,14 @@ function createRequest(baseUrl, agentOptions) {
|
|
|
34
34
|
const options = (0, omit_1.omit)(agentOptions, ["maxSockets"]);
|
|
35
35
|
return function request({ method, url: reqUrl, headers, body, timeout, expectBinary, }, cb) {
|
|
36
36
|
const url = new URL(reqUrl.pathname, base);
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
if (reqUrl.search) {
|
|
38
|
+
if (!base.search)
|
|
39
|
+
url.search = reqUrl.search.slice(1);
|
|
40
|
+
else
|
|
41
|
+
url.search = `${base.search}&${reqUrl.search.slice(1)}`;
|
|
41
42
|
}
|
|
43
|
+
else
|
|
44
|
+
url.search = base.search;
|
|
42
45
|
if (!headers["authorization"]) {
|
|
43
46
|
headers["authorization"] = `Basic ${auth}`;
|
|
44
47
|
}
|
package/lib/request.web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.web.js","sourceRoot":"","sources":["../../src/lib/request.web.ts"],"names":[],"mappings":";AAAA,2BAA2B;;;AAU3B,iCAAsC;AAEtC,iCAA8B;AAM9B,+BAAwB;AAEX,QAAA,SAAS,GAAG,IAAI,CAAC;AAE9B;;GAEG;AACH,SAAS,WAAW;IAClB,OAAO;QACL,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,IAAI,CAAC,OAAO;KACtB,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,aAAa,CAC3B,OAAe,EACf,YAA8C;IAE9C,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IAC9B,MAAM,IAAI,GAAG,IAAA,mBAAY,EAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzE,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACnB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACnB,MAAM,OAAO,GAAG,IAAA,WAAI,EAAC,YAAY,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IACnD,OAAO,SAAS,OAAO,CACrB,EACE,MAAM,EACN,GAAG,EAAE,MAAM,EACX,OAAO,EACP,IAAI,EACJ,OAAO,EACP,YAAY,GACG,EACjB,EAA6B;QAE7B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,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O,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;iBACtB;gBACD,QAAQ,CAAC,KAAK,CAAC,CAAC;aACjB;QACH,CAAC,CACF,CAAC;QACF,IAAI,OAAO,CAAC,MAAM,EAAE;YAClB,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SACrB;IACH,CAAC,CAAC;AACJ,CAAC;AArED,sCAqEC","sourcesContent":["/// <reference lib=\"dom\" />\n\n/**\n * Node.js implementation of the HTTP(S) request function.\n *\n * @packageDocumentation\n * @internal\n */\n\nimport { RequestInterceptors, XhrOptions } from \"../connection\";\nimport { base64Encode } from \"./btoa\";\nimport { Errback } from \"./errback\";\nimport { omit } from \"./omit\";\nimport {\n ArangojsError,\n ArangojsResponse,\n RequestOptions\n} from \"./request.node\";\nimport xhr from \"./xhr\";\n\nexport const isBrowser = true;\n\n/**\n * @internal\n */\nfunction errorToJSON(this: Error) {\n return {\n error: true,\n message: this.message,\n };\n}\n\n/**\n * Create a function for performing requests against a given host.\n *\n * @param baseUrl - Base URL of the host, i.e. protocol, port and domain name.\n * @param agentOptions - Options to use for performing requests.\n *\n * @param baseUrl\n * @param agentOptions\n *\n * @internal\n */\nexport function createRequest(\n baseUrl: string,\n agentOptions: XhrOptions & RequestInterceptors\n) {\n const base = new URL(baseUrl);\n const auth = base64Encode(`${base.username || \"root\"}:${base.password}`);\n base.username = \"\";\n base.password = \"\";\n const options = omit(agentOptions, [\"maxSockets\"]);\n return function request(\n {\n method,\n url: reqUrl,\n headers,\n body,\n timeout,\n expectBinary,\n }: RequestOptions,\n cb: Errback<ArangojsResponse>\n ) {\n const url = new URL(reqUrl.pathname, base);\n if (reqUrl.search) {\n if (!base.search) url.search = reqUrl.search.slice(1);\n else url.search = `${base.search}&${reqUrl.search.slice(1)}`\n } else url.search = base.search;\n if (!headers[\"authorization\"]) {\n headers[\"authorization\"] = `Basic ${auth}`;\n }\n\n let callback: Errback<ArangojsResponse> = (err, res) => {\n callback = () => undefined;\n cb(err, res);\n };\n const req = xhr(\n {\n useXDR: true,\n withCredentials: true,\n ...options,\n responseType: expectBinary ? \"blob\" : \"text\",\n url: String(url),\n body,\n method,\n headers,\n timeout,\n },\n (err: Error | null, res?: any) => {\n if (!err) {\n const response = res as ArangojsResponse;\n response.request = req;\n if (!response.body) response.body = \"\";\n if (options.after) {\n options.after(null, response);\n }\n callback(null, response as ArangojsResponse);\n } else {\n const error = err as ArangojsError;\n error.request = req;\n error.toJSON = errorToJSON;\n if (options.after) {\n options.after(error);\n }\n callback(error);\n }\n }\n );\n if (options.before) {\n options.before(req);\n }\n };\n}\n"]}
|