conflict_resolution
stringlengths
27
16k
<<<<<<< import {CannotCreateEntityIdMapError} from "../error/CannotCreateEntityIdMapError"; ======= import {PostgresConnectionOptions} from "../driver/postgres/PostgresConnectionOptions"; import {SqlServerConnectionOptions} from "../driver/sqlserver/SqlServerConnectionOptions"; >>>>>>> import {PostgresConnectionOptions} from "../driver/postgres/PostgresConnectionOptions"; import {SqlServerConnectionOptions} from "../driver/sqlserver/SqlServerConnectionOptions"; import {CannotCreateEntityIdMapError} from "../error/CannotCreateEntityIdMapError"; <<<<<<< this.tableMetadataArgs = options.args; this.target = this.tableMetadataArgs.target; this.tableType = this.tableMetadataArgs.type; ======= this.target = options.args.target; this.tableType = options.args.type; this.engine = options.args.engine; this.database = options.args.database; this.schema = options.args.schema || (options.connection.options as PostgresConnectionOptions|SqlServerConnectionOptions).schema; this.givenTableName = options.args.name; this.skipSync = options.args.skipSync || false; this.targetName = options.args.target instanceof Function ? (options.args.target as any).name : options.args.target; this.tableNameWithoutPrefix = this.tableType === "closure-junction" ? namingStrategy.closureJunctionTableName(this.givenTableName!) : namingStrategy.tableName(this.targetName, this.givenTableName); this.tableName = entityPrefix ? namingStrategy.prefixTableName(entityPrefix, this.tableNameWithoutPrefix) : this.tableNameWithoutPrefix; this.target = this.target ? this.target : this.tableName; this.name = this.targetName ? this.targetName : this.tableName; this.tablePath = this.buildTablePath(options.connection.driver); this.schemaPath = this.buildSchemaPath(options.connection.driver); this.isClassTableChild = this.tableType === "class-table-child"; this.isSingleTableChild = this.tableType === "single-table-child"; this.isEmbeddable = this.tableType === "embeddable"; this.isJunction = this.tableType === "closure-junction" || this.tableType === "junction"; this.isClosureJunction = this.tableType === "closure-junction"; this.isClosure = this.tableType === "closure"; this.isAbstract = this.tableType === "abstract"; this.isRegular = this.tableType === "regular"; this.orderBy = (options.args.orderBy instanceof Function) ? options.args.orderBy(this.propertiesMap) : options.args.orderBy; >>>>>>> this.tableMetadataArgs = options.args; this.target = this.tableMetadataArgs.target; this.tableType = this.tableMetadataArgs.type;
<<<<<<< import {EntityManager} from "../../entity-manager/EntityManager"; import {Broadcaster} from "../../subscriber/Broadcaster"; ======= import {InsertResult} from "../InsertResult"; import {TableIndexOptions} from "../../schema-builder/options/TableIndexOptions"; import {TableUnique} from "../../schema-builder/table/TableUnique"; import {BaseQueryRunner} from "../../query-runner/BaseQueryRunner"; import {OrmUtils} from "../../util/OrmUtils"; >>>>>>> import {TableIndexOptions} from "../../schema-builder/options/TableIndexOptions"; import {TableUnique} from "../../schema-builder/table/TableUnique"; import {BaseQueryRunner} from "../../query-runner/BaseQueryRunner"; import {OrmUtils} from "../../util/OrmUtils"; import {Broadcaster} from "../../subscriber/Broadcaster"; <<<<<<< /** * Connection used by this query runner. */ connection: Connection; /** * Broadcaster used on this query runner to broadcast entity events. */ broadcaster: Broadcaster; /** * Isolated entity manager working only with current query runner. */ manager: EntityManager; /** * Indicates if connection for this query runner is released. * Once its released, query runner cannot run queries anymore. */ isReleased = false; /** * Indicates if transaction is in progress. */ isTransactionActive = false; /** * Stores temporarily user data. * Useful for sharing data with subscribers. */ data = {}; // ------------------------------------------------------------------------- // Protected Properties // ------------------------------------------------------------------------- /** * Indicates if special query runner mode in which sql queries won't be executed is enabled. */ protected sqlMemoryMode: boolean = false; /** * Sql-s stored if "sql in memory" mode is enabled. */ protected sqlsInMemory: string[] = []; ======= >>>>>>> /** * Broadcaster used on this query runner to broadcast entity events. */ broadcaster: Broadcaster; <<<<<<< constructor(driver: AbstractSqliteDriver) { } ======= constructor() { super(); } >>>>>>> constructor() { super(); } <<<<<<< if (column.isUnique === true) c += " UNIQUE"; if (column.isGenerated === true && column.generationStrategy === "increment") { // don't use skipPrimary here since updates can update already exist primary without auto inc. c += " PRIMARY KEY AUTOINCREMENT"; } else if (column.isPrimary === true && column.isGenerated === true) { c += " PRIMARY KEY"; } if (column.default !== undefined && column.default !== null) { // todo: same code in all drivers. make it DRY ======= if (column.default !== undefined && column.default !== null) >>>>>>> if (column.default !== undefined && column.default !== null)
<<<<<<< const metadataPrimaryColumns = metadata.columns.filter(column => column.isPrimary && !column.isGenerated); const addedPrimaryColumns = metadataPrimaryColumns.filter(metadataPrimaryColumn => { return !!table.primaryKeyWithoutGenerated && !table.primaryKeyWithoutGenerated.columnNames.find(columnName => columnName === metadataPrimaryColumn.databaseName); }); const isPrimaryKeyDropped = !metadataPrimaryColumns.find(metadataPrimaryColumn => { return !!table.primaryKeyWithoutGenerated && !!table.primaryKeyWithoutGenerated.columnNames.find(columnName => columnName === metadataPrimaryColumn.databaseName); ======= const metadataPrimaryColumns = metadata.columns.filter(column => column.isPrimary); const addedKeys = metadataPrimaryColumns .filter(primaryKey => { return !table.primaryKeys.find(dbPrimaryKey => dbPrimaryKey.columnName === primaryKey.databaseName); }) .map(primaryKey => new TablePrimaryKey("", primaryKey.databaseName)); const droppedKeys = table.primaryKeys.filter(primaryKeySchema => { return !metadataPrimaryColumns.find(primaryKeyMetadata => primaryKeyMetadata.databaseName === primaryKeySchema.columnName); >>>>>>> const metadataPrimaryColumns = metadata.columns.filter(column => column.isPrimary); const addedKeys = metadataPrimaryColumns .filter(primaryKey => { return !table.primaryKeys.find(dbPrimaryKey => dbPrimaryKey.columnName === primaryKey.databaseName); }) .map(primaryKey => new TablePrimaryKey("", primaryKey.databaseName)); const droppedKeys = table.primaryKeys.filter(primaryKeySchema => { return !metadataPrimaryColumns.find(primaryKeyMetadata => primaryKeyMetadata.databaseName === primaryKeySchema.columnName); }); const isPrimaryKeyDropped = !metadataPrimaryColumns.find(metadataPrimaryColumn => { return !!table.primaryKeyWithoutGenerated && !!table.primaryKeyWithoutGenerated.columnNames.find(columnName => columnName === metadataPrimaryColumn.databaseName);
<<<<<<< import {Broadcaster} from "../subscriber/Broadcaster"; ======= import {SqlInMemory} from "../driver/SqlInMemory"; import {TableUnique} from "../schema-builder/table/TableUnique"; >>>>>>> import {SqlInMemory} from "../driver/SqlInMemory"; import {TableUnique} from "../schema-builder/table/TableUnique"; import {Broadcaster} from "../subscriber/Broadcaster"; <<<<<<< * Broadcaster used on this query runner to broadcast entity events. */ readonly broadcaster: Broadcaster; /** * Isolated entity manager working only with current query runner. ======= * Isolated entity manager working only with this query runner. >>>>>>> * Broadcaster used on this query runner to broadcast entity events. */ readonly broadcaster: Broadcaster; /** * Isolated entity manager working only with this query runner. <<<<<<< * Inserts new values into closure table. ======= * Insert a new row with given values into the given table. * Returns value of the generated column if given and generate column exist in the table. * * @deprecated todo: remove later use query builder instead */ insert(tablePath: string, valuesMap: Object): Promise<InsertResult>; /** * Updates rows that match given simple conditions in the given table. * * @deprecated todo: remove later use query builder instead */ update(tablePath: string, valuesMap: Object, conditions: Object): Promise<void>; /** * Performs a simple DELETE query by a given conditions in a given table. * * @deprecated todo: remove later use query builder instead */ delete(tablePath: string, condition: Object|string, parameters?: any[]): Promise<void>; /** * Inserts new values into closure table. * * @deprecated todo: move to ClosureQueryBuilder */ insertIntoClosureTable(tablePath: string, newEntityId: any, parentId: any, hasLevel: boolean): Promise<number>; /** * Returns all available database names including system databases. >>>>>>> * Inserts new values into closure table. * * @deprecated todo: move to ClosureQueryBuilder */ insertIntoClosureTable(tablePath: string, newEntityId: any, parentId: any, hasLevel: boolean): Promise<number>; /** * Returns all available database names including system databases.
<<<<<<< async function getChangedFiles(token: string): Promise<File[] | null> { if (github.context.eventName === 'pull_request') { ======= async function getChangedFiles(token: string): Promise<string[] | null> { if (github.context.eventName === 'pull_request' || github.context.eventName === 'pull_request_target') { >>>>>>> async function getChangedFiles(token: string): Promise<File[] | null> { if (github.context.eventName === 'pull_request' || github.context.eventName === 'pull_request_target') {
<<<<<<< await queryRunner.createTable(new Table("migrations", [ new TableColumn({ name: "timestamp", type: this.connection.driver.normalizeType({ type: this.connection.driver.mappedDataTypes.migrationTimestamp }), isPrimary: true, isNullable: false }), new TableColumn({ name: "name", type: this.connection.driver.normalizeType({ type: this.connection.driver.mappedDataTypes.migrationName }), isNullable: false }), ])); ======= await this.queryRunner.createTable(new Table( { name: "migrations", columns: [ { name: "timestamp", type: this.connection.driver.normalizeType({type: this.connection.driver.mappedDataTypes.migrationTimestamp}), isPrimary: true, isNullable: false }, { name: "name", type: this.connection.driver.normalizeType({type: this.connection.driver.mappedDataTypes.migrationName}), isNullable: false }, ] }, )); >>>>>>> await queryRunner.createTable(new Table( { name: "migrations", columns: [ { name: "timestamp", type: this.connection.driver.normalizeType({type: this.connection.driver.mappedDataTypes.migrationTimestamp}), isPrimary: true, isNullable: false }, { name: "name", type: this.connection.driver.normalizeType({type: this.connection.driver.mappedDataTypes.migrationName}), isNullable: false }, ] }, ));
<<<<<<< import {UniqueMetadata} from "./UniqueMetadata"; ======= import {PostgresConnectionOptions} from "../driver/postgres/PostgresConnectionOptions"; import {SqlServerConnectionOptions} from "../driver/sqlserver/SqlServerConnectionOptions"; import {CannotCreateEntityIdMapError} from "../error/CannotCreateEntityIdMapError"; >>>>>>> import {PostgresConnectionOptions} from "../driver/postgres/PostgresConnectionOptions"; import {SqlServerConnectionOptions} from "../driver/sqlserver/SqlServerConnectionOptions"; import {CannotCreateEntityIdMapError} from "../error/CannotCreateEntityIdMapError"; import {UniqueMetadata} from "./UniqueMetadata"; <<<<<<< * Entity's relation id metadatas. */ relationIds: RelationIdMetadata[] = []; /** * Entity's relation id metadatas. */ relationCounts: RelationCountMetadata[] = []; /** * Entity's index metadatas. */ indices: IndexMetadata[] = []; /** * Entity's unique metadatas. */ uniques: UniqueMetadata[] = []; /** * Entity's foreign key metadatas. */ foreignKeys: ForeignKeyMetadata[] = []; /** * Entity's embedded metadatas. */ embeddeds: EmbeddedMetadata[] = []; /** * All embeddeds - embeddeds from this entity metadata and from all child embeddeds, etc. */ allEmbeddeds: EmbeddedMetadata[] = []; /** * Entity listener metadatas. */ listeners: EntityListenerMetadata[] = []; /** * Listener metadatas with "AFTER LOAD" type. */ afterLoadListeners: EntityListenerMetadata[] = []; /** * Listener metadatas with "AFTER INSERT" type. */ beforeInsertListeners: EntityListenerMetadata[] = []; /** * Listener metadatas with "AFTER INSERT" type. */ afterInsertListeners: EntityListenerMetadata[] = []; /** * Listener metadatas with "AFTER UPDATE" type. */ beforeUpdateListeners: EntityListenerMetadata[] = []; /** * Listener metadatas with "AFTER UPDATE" type. */ afterUpdateListeners: EntityListenerMetadata[] = []; /** * Listener metadatas with "AFTER REMOVE" type. */ beforeRemoveListeners: EntityListenerMetadata[] = []; /** * Listener metadatas with "AFTER REMOVE" type. */ afterRemoveListeners: EntityListenerMetadata[] = []; /** * If this entity metadata's table using one of the inheritance patterns, * then this will contain what pattern it uses. */ inheritanceType?: "single-table"|"class-table"; /** * If this entity metadata is a child table of some table, it should have a discriminator value. * Used to store a value in a discriminator column. */ discriminatorValue?: string; /** * Checks if entity's table has multiple primary columns. */ hasMultiplePrimaryKeys: boolean; /** * Indicates if this entity metadata has uuid generated columns. */ hasUUIDGeneratedColumns: boolean; /** ======= >>>>>>> <<<<<<< this.recomputeColumnDependencies( this.ownColumns); ======= this.columns = this.embeddeds.reduce((columns, embedded) => columns.concat(embedded.columnsFromTree), this.ownColumns); this.primaryColumns = this.columns.filter(column => column.isPrimary); this.hasMultiplePrimaryKeys = this.primaryColumns.length > 1; this.hasUUIDGeneratedColumns = this.columns.filter(column => column.isGenerated || column.generationStrategy === "uuid").length > 0; this.propertiesMap = this.createPropertiesMap(); >>>>>>> this.columns = this.embeddeds.reduce((columns, embedded) => columns.concat(embedded.columnsFromTree), this.ownColumns); this.primaryColumns = this.columns.filter(column => column.isPrimary); this.hasMultiplePrimaryKeys = this.primaryColumns.length > 1; this.hasUUIDGeneratedColumns = this.columns.filter(column => column.isGenerated || column.generationStrategy === "uuid").length > 0; this.propertiesMap = this.createPropertiesMap();
<<<<<<< import {NativescriptConnectionOptions} from "../driver/nativescript/NativescriptConnectionOptions"; ======= import {ExpoConnectionOptions} from "../driver/expo/ExpoConnectionOptions"; >>>>>>> import {NativescriptConnectionOptions} from "../driver/nativescript/NativescriptConnectionOptions"; import {ExpoConnectionOptions} from "../driver/expo/ExpoConnectionOptions";
<<<<<<< findByIds<Entity>(entityClass: ObjectType<Entity>|string, ids: any[], optionsOrConditions?: FindManyOptions<Entity>|DeepPartial<Entity>): Promise<Entity[]> { ======= findByIds<Entity>(entityClass: ObjectType<Entity>|string, ids: any[], optionsOrConditions?: FindManyOptions<Entity>|Partial<Entity>): Promise<Entity[]> { // if no ids passed, no need to execute a query - just return an empty array of values if (!ids.length) return Promise.resolve([]); >>>>>>> findByIds<Entity>(entityClass: ObjectType<Entity>|string, ids: any[], optionsOrConditions?: FindManyOptions<Entity>|DeepPartial<Entity>): Promise<Entity[]> { // if no ids passed, no need to execute a query - just return an empty array of values if (!ids.length) return Promise.resolve([]);
<<<<<<< async log(): Promise<SqlInMemory> { this.queryRunner = await this.connection.createQueryRunner("master"); ======= async log(): Promise<(string|{ up: string, down: string })[]> { this.queryRunner = this.connection.createQueryRunner("master"); >>>>>>> async log(): Promise<SqlInMemory> { this.queryRunner = this.connection.createQueryRunner("master");
<<<<<<< import {EntityManager} from "../../entity-manager/EntityManager"; ======= import {InsertResult} from "../InsertResult"; >>>>>>> <<<<<<< import {Broadcaster} from "../../subscriber/Broadcaster"; ======= import {OrmUtils} from "../../util/OrmUtils"; import {TableIndexOptions} from "../../schema-builder/options/TableIndexOptions"; import {TableUnique} from "../../schema-builder/table/TableUnique"; import {BaseQueryRunner} from "../../query-runner/BaseQueryRunner"; >>>>>>> import {Broadcaster} from "../../subscriber/Broadcaster"; import {TableIndexOptions} from "../../schema-builder/options/TableIndexOptions"; import {TableUnique} from "../../schema-builder/table/TableUnique"; import {BaseQueryRunner} from "../../query-runner/BaseQueryRunner"; import {OrmUtils} from "../../util/OrmUtils"; <<<<<<< /** * Connection used by this query runner. */ connection: Connection; /** * Broadcaster used on this query runner to broadcast entity events. */ broadcaster: Broadcaster; /** * Isolated entity manager working only with current query runner. */ manager: EntityManager; /** * Indicates if connection for this query runner is released. * Once its released, query runner cannot run queries anymore. */ isReleased = false; /** * Indicates if transaction is in progress. */ isTransactionActive = false; /** * Stores temporarily user data. * Useful for sharing data with subscribers. */ data = {}; ======= >>>>>>> /** * Broadcaster used on this query runner to broadcast entity events. */ broadcaster: Broadcaster; <<<<<<< ======= * Insert a new row with given values into the given table. * Returns value of the generated column if given and generate column exist in the table. */ async insert(tableName: string, keyValues: ObjectLiteral): Promise<InsertResult> { const keys = Object.keys(keyValues); const columns = keys.map(key => `"${key}"`).join(", "); const values = keys.map((key, index) => "$" + (index + 1)).join(","); const generatedColumns = this.connection.hasMetadata(tableName) ? this.connection.getMetadata(tableName).generatedColumns : []; const generatedColumnNames = generatedColumns.map(generatedColumn => `"${generatedColumn.databaseName}"`).join(", "); const generatedColumnSql = generatedColumns.length > 0 ? ` RETURNING ${generatedColumnNames}` : ""; const sql = columns.length > 0 ? `INSERT INTO ${this.escapeTableName(tableName)}(${columns}) VALUES (${values}) ${generatedColumnSql}` : `INSERT INTO ${this.escapeTableName(tableName)} DEFAULT VALUES ${generatedColumnSql}`; const parameters = keys.map(key => keyValues[key]); const result: ObjectLiteral[] = await this.query(sql, parameters); const generatedMap = generatedColumns.reduce((map, column) => { const valueMap = column.createValueMap(result[0][column.databaseName]); return OrmUtils.mergeDeep(map, valueMap); }, {} as ObjectLiteral); return { result: result, generatedMap: Object.keys(generatedMap).length > 0 ? generatedMap : undefined }; } /** * Updates rows that match given conditions in the given table. */ async update(tableName: string, valuesMap: ObjectLiteral, conditions: ObjectLiteral): Promise<void> { const updateValues = this.parametrize(valuesMap).join(", "); const conditionString = this.parametrize(conditions, Object.keys(valuesMap).length).join(" AND "); const query = `UPDATE ${this.escapeTableName(tableName)} SET ${updateValues}${conditionString ? (" WHERE " + conditionString) : ""}`; const updateParams = Object.keys(valuesMap).map(key => valuesMap[key]); const conditionParams = Object.keys(conditions).map(key => conditions[key]); const allParameters = updateParams.concat(conditionParams); await this.query(query, allParameters); } /** * Deletes from the given table by a given conditions. */ async delete(tableName: string, conditions: ObjectLiteral|string, maybeParameters?: any[]): Promise<void> { const conditionString = typeof conditions === "string" ? conditions : this.parametrize(conditions).join(" AND "); const parameters = conditions instanceof Object ? Object.keys(conditions).map(key => (conditions as ObjectLiteral)[key]) : maybeParameters; const sql = `DELETE FROM ${this.escapeTableName(tableName)} WHERE ${conditionString}`; await this.query(sql, parameters); } /** >>>>>>>
<<<<<<< import {ColumnOptions} from "../decorator/options/ColumnOptions"; import {ForeignKeyMetadata} from "../metadata/ForeignKeyMetadata"; import {LazyRelationsWrapper} from "../lazy-loading/LazyRelationsWrapper"; import {UniqueMetadata} from "../metadata/UniqueMetadata"; ======= >>>>>>> import {UniqueMetadata} from "../metadata/UniqueMetadata"; <<<<<<< // build all unique constraints (need to do it after relations and their join columns are built) entityMetadatas.forEach(entityMetadata => { entityMetadata.uniques.forEach(unique => unique.build(this.connection.namingStrategy)); }); entityMetadatas .filter(metadata => !!metadata.parentEntityMetadata && metadata.tableType === "class-table-child") .forEach(metadata => { const parentPrimaryColumns = metadata.parentEntityMetadata.primaryColumns; const parentRelationColumns = parentPrimaryColumns.map(parentPrimaryColumn => { const columnName = this.connection.namingStrategy.classTableInheritanceParentColumnName(metadata.parentEntityMetadata.tableName, parentPrimaryColumn.propertyPath); const column = new ColumnMetadata({ connection: this.connection, entityMetadata: metadata, referencedColumn: parentPrimaryColumn, args: { target: metadata.target, propertyName: columnName, mode: "parentId", options: <ColumnOptions> { name: columnName, type: parentPrimaryColumn.type, unique: false, nullable: false, primary: true } } }); metadata.registerColumn(column); column.build(this.connection); return column; }); metadata.foreignKeys = [ new ForeignKeyMetadata({ entityMetadata: metadata, referencedEntityMetadata: metadata.parentEntityMetadata, namingStrategy: this.connection.namingStrategy, columns: parentRelationColumns, referencedColumns: parentPrimaryColumns, onDelete: "CASCADE" }) ]; }); ======= >>>>>>> // build all unique constraints (need to do it after relations and their join columns are built) entityMetadatas.forEach(entityMetadata => { entityMetadata.uniques.forEach(unique => unique.build(this.connection.namingStrategy)); });
<<<<<<< async insert<Entity>(target: ObjectType<Entity>|string, entity: QueryPartialEntity<Entity>|(QueryPartialEntity<Entity>[]), options?: SaveOptions): Promise<InsertResult> { // TODO: Oracle does not support multiple values. Need to create another nice solution. if (this.connection.driver instanceof OracleDriver && entity instanceof Array) { const results = await Promise.all(entity.map(entity => this.insert(target, entity))); return results.reduce((mergedResult, result) => Object.assign(mergedResult, result), {} as InsertResult); } ======= async insert<Entity>(target: ObjectType<Entity>|EntitySchema<Entity>|string, entity: QueryPartialEntity<Entity>|(QueryPartialEntity<Entity>[]), options?: SaveOptions): Promise<InsertResult> { >>>>>>> async insert<Entity>(target: ObjectType<Entity>|EntitySchema<Entity>|string, entity: QueryPartialEntity<Entity>|(QueryPartialEntity<Entity>[]), options?: SaveOptions): Promise<InsertResult> { // TODO: Oracle does not support multiple values. Need to create another nice solution. if (this.connection.driver instanceof OracleDriver && entity instanceof Array) { const results = await Promise.all(entity.map(entity => this.insert(target, entity))); return results.reduce((mergedResult, result) => Object.assign(mergedResult, result), {} as InsertResult); }
<<<<<<< count<Entity>(entityClass: ObjectType<Entity>|string, optionsOrConditions?: FindManyOptions<Entity>|DeepPartial<Entity>): Promise<number> { ======= async count<Entity>(entityClass: ObjectType<Entity>|string, optionsOrConditions?: FindManyOptions<Entity>|Partial<Entity>): Promise<number> { >>>>>>> async count<Entity>(entityClass: ObjectType<Entity>|string, optionsOrConditions?: FindManyOptions<Entity>|DeepPartial<Entity>): Promise<number> { <<<<<<< find<Entity>(entityClass: ObjectType<Entity>|string, optionsOrConditions?: FindManyOptions<Entity>|DeepPartial<Entity>): Promise<Entity[]> { ======= async find<Entity>(entityClass: ObjectType<Entity>|string, optionsOrConditions?: FindManyOptions<Entity>|Partial<Entity>): Promise<Entity[]> { >>>>>>> async find<Entity>(entityClass: ObjectType<Entity>|string, optionsOrConditions?: FindManyOptions<Entity>|DeepPartial<Entity>): Promise<Entity[]> { <<<<<<< findAndCount<Entity>(entityClass: ObjectType<Entity>|string, optionsOrConditions?: FindManyOptions<Entity>|DeepPartial<Entity>): Promise<[Entity[], number]> { ======= async findAndCount<Entity>(entityClass: ObjectType<Entity>|string, optionsOrConditions?: FindManyOptions<Entity>|Partial<Entity>): Promise<[Entity[], number]> { >>>>>>> async findAndCount<Entity>(entityClass: ObjectType<Entity>|string, optionsOrConditions?: FindManyOptions<Entity>|DeepPartial<Entity>): Promise<[Entity[], number]> { <<<<<<< findByIds<Entity>(entityClass: ObjectType<Entity>|string, ids: any[], optionsOrConditions?: FindManyOptions<Entity>|DeepPartial<Entity>): Promise<Entity[]> { ======= async findByIds<Entity>(entityClass: ObjectType<Entity>|string, ids: any[], optionsOrConditions?: FindManyOptions<Entity>|Partial<Entity>): Promise<Entity[]> { >>>>>>> async findByIds<Entity>(entityClass: ObjectType<Entity>|string, ids: any[], optionsOrConditions?: FindManyOptions<Entity>|DeepPartial<Entity>): Promise<Entity[]> { <<<<<<< findOne<Entity>(entityClass: ObjectType<Entity>|string, idOrOptionsOrConditions?: string|string[]|number|number[]|Date|Date[]|ObjectID|ObjectID[]|FindOneOptions<Entity>|DeepPartial<Entity>, maybeOptions?: FindOneOptions<Entity>): Promise<Entity|undefined> { ======= async findOne<Entity>(entityClass: ObjectType<Entity>|string, optionsOrConditions?: FindOneOptions<Entity>|Partial<Entity>): Promise<Entity|undefined> { >>>>>>> async findOne<Entity>(entityClass: ObjectType<Entity>|string, idOrOptionsOrConditions?: string|string[]|number|number[]|Date|Date[]|ObjectID|ObjectID[]|FindOneOptions<Entity>|DeepPartial<Entity>, maybeOptions?: FindOneOptions<Entity>): Promise<Entity|undefined> {
<<<<<<< const widgetMultiFilesDiv = document.evaluate('//div[contains(@class, "code-container")]/div[contains(@class, "Widget__MultiFiles")]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); ======= const pageContentDiv = document.evaluate('//div[contains(@class, "PageContent-sc")]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); let allCodeContent = ""; const codeContainerDivs = document.evaluate('//div[contains(@class, "styles__Files-sc")]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); >>>>>>> const widgetMultiFilesDiv = document.evaluate('//div[contains(@class, "code-container")]/div[contains(@class, "Widget__MultiFiles")]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); <<<<<<< const codeFileDiv = codeContainer.childNodes; ======= const codeFileDiv = codeContainer.childNodes; >>>>>>> const codeFileDiv = codeContainer.childNodes; <<<<<<< const codeContent = document.evaluate('//div[contains(@class, "cmcomp-single-editor-container")]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); ======= const codeContent = document.evaluate('//div[contains(@class, "cmcomp-single-editor-container")]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); >>>>>>> const codeContent = document.evaluate('//div[contains(@class, "cmcomp-single-editor-container")]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); <<<<<<< if (i == j) { let allCodeContent = ""; allCodeContent += '\n---------------------------------------------------------------------------------------------------\n'; allCodeContent += codeFileLink.innerText; allCodeContent += '\n---------------------------------------------------------------------------------------------------\n\n'; let textBoxContent = codeContent.snapshotItem(j) as HTMLDivElement; ======= if (i === j) { allCodeContent += '-------------------------------------------------------------------------\n'; allCodeContent += '| ' + codeFileLink.innerText + ' [' + (i + 1) + ']'; allCodeContent += '\n-------------------------------------------------------------------------\n\n\n'; const textBoxContent = codeContent.snapshotItem(j) as HTMLDivElement; >>>>>>> if (i == j) { let allCodeContent = ""; allCodeContent += '\n---------------------------------------------------------------------------------------------------\n'; allCodeContent += codeFileLink.innerText; allCodeContent += '\n---------------------------------------------------------------------------------------------------\n\n'; let textBoxContent = codeContent.snapshotItem(j) as HTMLDivElement; <<<<<<< ======= allCodeContent += '\n\n\n'; } } } allCodeContent += '\n\n\n**********************************************************************************\n\n\n'; } if (allCodeContent !== "") { const divToCreate = document.createElement('div'); divToCreate.innerHTML = `<br><br><hr> <h1>Code Files Content !!!<h1> <hr> <h2>⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋ ⤋</h2> <pre>${allCodeContent}</pre>`; pageContentDiv.snapshotItem(0).appendChild(divToCreate); } >>>>>>>
<<<<<<< export { DescriptionListItem } from './components/DescriptionList' ======= export { AccordionPanel, AccordionPanelItem, AccordionPanelContent, AccordionPanelTrigger, } from './components/AccordionPanel' >>>>>>> export { DescriptionListItem } from './components/DescriptionList' export { AccordionPanel, AccordionPanelItem, AccordionPanelContent, AccordionPanelTrigger, } from './components/AccordionPanel'
<<<<<<< export { BlankImage } from './components/Image' ======= export { Heading } from './components/Heading' export { HeadlineArea } from './components/HeadlineArea' >>>>>>> export { BlankImage } from './components/Image' export { Heading } from './components/Heading' export { HeadlineArea } from './components/HeadlineArea'
<<<<<<< import { CesiumExtender } from '../cesium-extender/extender'; import { AcHtmlDescComponent } from './components/ac-html-desc/ac-html-desc.component'; import { AcHtmlDirective } from './directives/ac-html/ac-html.directive'; import { AcHtmlContainerDirective } from './directives/ac-html-container/ac-html-container.directive'; ======= import { AcContextMenuWrapperComponent } from './components/ac-context-menu-wrapper/ac-context-menu-wrapper.component'; import { AcPointPrimitiveDescComponent } from './components/ac-point-primitive-desc/ac-point-primitive-desc.component'; >>>>>>> import { CesiumExtender } from '../cesium-extender/extender'; import { AcHtmlDescComponent } from './components/ac-html-desc/ac-html-desc.component'; import { AcHtmlDirective } from './directives/ac-html/ac-html.directive'; import { AcHtmlContainerDirective } from './directives/ac-html-container/ac-html-container.directive'; import { AcContextMenuWrapperComponent } from './components/ac-context-menu-wrapper/ac-context-menu-wrapper.component'; import { AcPointPrimitiveDescComponent } from './components/ac-point-primitive-desc/ac-point-primitive-desc.component'; <<<<<<< AcHtmlDescComponent, AcHtmlDirective, AcHtmlContainerDirective, ======= AcContextMenuWrapperComponent, AcPointPrimitiveDescComponent, >>>>>>> AcContextMenuWrapperComponent, AcPointPrimitiveDescComponent, AcHtmlDescComponent, AcHtmlDirective, AcHtmlContainerDirective, <<<<<<< AcHtmlDescComponent, ======= AcContextMenuWrapperComponent, AcPointPrimitiveDescComponent, >>>>>>> AcContextMenuWrapperComponent, AcPointPrimitiveDescComponent, AcHtmlDescComponent,
<<<<<<< import { ArcDrawerService } from '../../services/arc-drawer/arc-drawer.service'; ======= import { PolygonDrawerService } from '../../services/polygon-drawer/polygon-drawer.service'; >>>>>>> import { PolygonDrawerService } from '../../services/polygon-drawer/polygon-drawer.service'; import { ArcDrawerService } from '../../services/arc-drawer/arc-drawer.service'; <<<<<<< providers: [LayerService, ComputationCache, BillboardDrawerService, LabelDrawerService, EllipseDrawerService, DynamicEllipseDrawerService, DynamicPolylineDrawerService, StaticCircleDrawerService, StaticPolylineDrawerService, ArcDrawerService] ======= providers: [LayerService, ComputationCache, BillboardDrawerService, LabelDrawerService, EllipseDrawerService, DynamicEllipseDrawerService, DynamicPolylineDrawerService, StaticCircleDrawerService, StaticPolylineDrawerService, PolygonDrawerService] >>>>>>> providers: [LayerService, ComputationCache, BillboardDrawerService, LabelDrawerService, EllipseDrawerService, DynamicEllipseDrawerService, DynamicPolylineDrawerService, StaticCircleDrawerService, StaticPolylineDrawerService, PolygonDrawerService] providers: [LayerService, ComputationCache, BillboardDrawerService, LabelDrawerService, EllipseDrawerService, DynamicEllipseDrawerService, DynamicPolylineDrawerService, StaticCircleDrawerService, StaticPolylineDrawerService, ArcDrawerService] <<<<<<< private _computationCache: ComputationCache, billboardDrawerService: BillboardDrawerService, labelDrawerService: LabelDrawerService, ellipseDrawerService: EllipseDrawerService, dynamicEllipseDrawerService: DynamicEllipseDrawerService, dynamicPolylineDrawerService: DynamicPolylineDrawerService, staticCircleDrawerService: StaticCircleDrawerService, staticPolylineDrawerService: StaticPolylineDrawerService, arcDrawerService: ArcDrawerService) { ======= private _computationCache: ComputationCache, billboardDrawerService: BillboardDrawerService, labelDrawerService: LabelDrawerService, ellipseDrawerService: EllipseDrawerService, dynamicEllipseDrawerService: DynamicEllipseDrawerService, dynamicPolylineDrawerService: DynamicPolylineDrawerService, staticCircleDrawerService: StaticCircleDrawerService, staticPolylineDrawerService: StaticPolylineDrawerService, polygonDrawerService: PolygonDrawerService) { >>>>>>> private _computationCache: ComputationCache, billboardDrawerService: BillboardDrawerService, labelDrawerService: LabelDrawerService, ellipseDrawerService: EllipseDrawerService, dynamicEllipseDrawerService: DynamicEllipseDrawerService, dynamicPolylineDrawerService: DynamicPolylineDrawerService, staticCircleDrawerService: StaticCircleDrawerService, staticPolylineDrawerService: StaticPolylineDrawerService, polygonDrawerService: PolygonDrawerService) { private _computationCache: ComputationCache, billboardDrawerService: BillboardDrawerService, labelDrawerService: LabelDrawerService, ellipseDrawerService: EllipseDrawerService, dynamicEllipseDrawerService: DynamicEllipseDrawerService, dynamicPolylineDrawerService: DynamicPolylineDrawerService, staticCircleDrawerService: StaticCircleDrawerService, staticPolylineDrawerService: StaticPolylineDrawerService, arcDrawerService: ArcDrawerService) { <<<<<<< staticPolylineDrawerService, arcDrawerService ======= staticPolylineDrawerService, polygonDrawerService >>>>>>> staticPolylineDrawerService, polygonDrawerService staticPolylineDrawerService, arcDrawerService
<<<<<<< import {AcMapLayerProviderComponent} from "./components/ac-map-layer-provider/ac-map-layer-provider.component"; ======= import {GeoUtilsService} from "./services/geo-utils/geo-utils.service"; >>>>>>> import {AcMapLayerProviderComponent} from "./components/ac-map-layer-provider/ac-map-layer-provider.component"; import {GeoUtilsService} from "./services/geo-utils/geo-utils.service";
<<<<<<< public Cesium = Cesium; public editPoints$ = new Subject<AcNotification>(); public editPolylines$ = new Subject<AcNotification>(); public editPolygons$ = new Subject<AcNotification>(); public appearance = new Cesium.PerInstanceColorAppearance({flat : true}); public attributes = {color : Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(0.2, 0.2, 0.5, 0.5))}; @ViewChild('editPolygonsLayer') private editPolygonsLayer: AcLayerComponent; @ViewChild('editPointsLayer') private editPointsLayer: AcLayerComponent; @ViewChild('editPolylinesLayer') private editPolylinesLayer: AcLayerComponent; constructor(private polygonsEditor: PolygonsEditorService, private coordinateConverter: CoordinateConverter, private mapEventsManager: MapEventsManagerService, private cameraService: CameraService, private polygonsManager: PolygonsManagerService) { this.polygonsEditor.init(this.mapEventsManager, this.coordinateConverter, this.cameraService, polygonsManager); this.startListeningToEditorUpdates(); } private startListeningToEditorUpdates() { this.polygonsEditor.onUpdate().subscribe((update: PolygonEditUpdate) => { if (update.editMode === EditModes.CREATE || update.editMode === EditModes.CREATE_OR_EDIT) { this.handleCreateUpdates(update); } else if (update.editMode === EditModes.EDIT) { this.handleEditUpdates(update); } }); } handleCreateUpdates(update: PolygonEditUpdate) { switch (update.editAction) { case EditActions.INIT: { this.polygonsManager.createEditablePolygon( update.id, this.editPolygonsLayer, this.editPointsLayer, this.editPolylinesLayer, this.coordinateConverter, update.polygonOptions); break; } case EditActions.MOUSE_MOVE: { const polygon = this.polygonsManager.get(update.id); if (update.updatedPosition) { polygon.moveTempMovingPoint(update.updatedPosition); } break; } case EditActions.ADD_POINT: { const polygon = this.polygonsManager.get(update.id); if (update.updatedPosition) { polygon.addPoint(update.updatedPosition); } break; } case EditActions.ADD_LAST_POINT: { const polygon = this.polygonsManager.get(update.id); if (update.updatedPosition) { polygon.addLastPoint(update.updatedPosition); } break; } case EditActions.DISPOSE: { const polygon = this.polygonsManager.get(update.id); polygon.dispose(); break; } default: { return; } } } handleEditUpdates(update: PolygonEditUpdate) { switch (update.editAction) { case EditActions.INIT: { this.polygonsManager.createEditablePolygon( update.id, this.editPolygonsLayer, this.editPointsLayer, this.editPolylinesLayer, this.coordinateConverter, update.polygonOptions, update.positions ); break; } case EditActions.DRAG_POINT: { const polygon = this.polygonsManager.get(update.id); if (polygon && polygon.enableEdit) { polygon.movePoint(update.updatedPosition, update.updatedPoint); } break; } case EditActions.DRAG_POINT_FINISH: { const polygon = this.polygonsManager.get(update.id); if (polygon && polygon.enableEdit && update.updatedPoint.isVirtualEditPoint()) { polygon.addVirtualEditPoint(update.updatedPoint); } break; } case EditActions.REMOVE_POINT: { const polygon = this.polygonsManager.get(update.id); if (polygon && polygon.enableEdit) { polygon.removePoint(update.updatedPoint); } break; } case EditActions.DISABLE: { const polygon = this.polygonsManager.get(update.id); if (polygon) { polygon.enableEdit = false; } break; } case EditActions.ENABLE: { const polygon = this.polygonsManager.get(update.id); if (polygon) { polygon.enableEdit = true; } break; } case EditActions.SET_MANUALLY: { const polygon = this.polygonsManager.get(update.id); if (polygon) { polygon.setPointsManually(update.points); } break; } default: { return; } } } ngOnDestroy(): void { this.polygonsManager.clear(); } getPointSize(point: EditPoint) { return point.isVirtualEditPoint() ? 8 : 15; } ======= public Cesium = Cesium; public editPoints$ = new Subject<AcNotification>(); public editPolylines$ = new Subject<AcNotification>(); public editPolygons$ = new Subject<AcNotification>(); public appearance = new Cesium.PerInstanceColorAppearance({ flat: true }); public attributes = { color: Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(0.2, 0.2, 0.5, 0.5)) }; public polygonColor = new Cesium.Color(0.1, 0.5, 0.2, 0.4); public lineColor = new Cesium.Color(0, 0, 0, 0.6); @ViewChild('editPolygonsLayer') private editPolygonsLayer: AcLayerComponent; @ViewChild('editPointsLayer') private editPointsLayer: AcLayerComponent; @ViewChild('editPolylinesLayer') private editPolylinesLayer: AcLayerComponent; constructor(private polygonsEditor: PolygonsEditorService, private coordinateConverter: CoordinateConverter, private mapEventsManager: MapEventsManagerService, private cameraService: CameraService, private polygonsManager: PolygonsManagerService) { this.polygonsEditor.init(this.mapEventsManager, this.coordinateConverter, this.cameraService, polygonsManager); this.startListeningToEditorUpdates(); } private startListeningToEditorUpdates() { this.polygonsEditor.onUpdate().subscribe((update: PolygonEditUpdate) => { if (update.editMode === EditModes.CREATE || update.editMode === EditModes.CREATE_OR_EDIT) { this.handleCreateUpdates(update); } else if (update.editMode === EditModes.EDIT) { this.handleEditUpdates(update); } }); } handleCreateUpdates(update: PolygonEditUpdate) { switch (update.editAction) { case EditActions.INIT: { this.polygonsManager.createEditablePolygon( update.id, this.editPolygonsLayer, this.editPointsLayer, this.editPolylinesLayer, this.coordinateConverter, update.polygonOptions); break; } case EditActions.MOUSE_MOVE: { const polygon = this.polygonsManager.get(update.id); if (update.updatedPosition) { polygon.moveTempMovingPoint(update.updatedPosition); } break; } case EditActions.ADD_POINT: { const polygon = this.polygonsManager.get(update.id); if (update.updatedPosition) { polygon.addPoint(update.updatedPosition); } break; } case EditActions.ADD_LAST_POINT: { const polygon = this.polygonsManager.get(update.id); if (update.updatedPosition) { polygon.addLastPoint(update.updatedPosition); } break; } case EditActions.DISPOSE: { this.polygonsManager.dispose(update.id); break; } default: { return; } } } handleEditUpdates(update: PolygonEditUpdate) { switch (update.editAction) { case EditActions.INIT: { this.polygonsManager.createEditablePolygon( update.id, this.editPolygonsLayer, this.editPointsLayer, this.editPolylinesLayer, this.coordinateConverter, update.polygonOptions, update.positions ); break; } case EditActions.DRAG_POINT: { const polygon = this.polygonsManager.get(update.id); if (polygon && polygon.enableEdit) { polygon.movePoint(update.updatedPosition, update.updatedPoint); } break; } case EditActions.DRAG_POINT_FINISH: { const polygon = this.polygonsManager.get(update.id); if (polygon && polygon.enableEdit && update.updatedPoint.isVirtualEditPoint()) { polygon.addVirtualEditPoint(update.updatedPoint); } break; } case EditActions.DRAG_SHAPE: { const polygon = this.polygonsManager.get(update.id); if (polygon && polygon.enableEdit) { polygon.movePolygon(update.draggedPosition, update.updatedPosition) } break; } case EditActions.DRAG_SHAPE_FINISH: { const polygon = this.polygonsManager.get(update.id); if (polygon && polygon.enableEdit) { polygon.endMovePolygon() } break; } case EditActions.REMOVE_POINT: { const polygon = this.polygonsManager.get(update.id); if (polygon && polygon.enableEdit) { polygon.removePoint(update.updatedPoint); } break; } case EditActions.DISABLE: { const polygon = this.polygonsManager.get(update.id); if (polygon) { polygon.enableEdit = false; } break; } case EditActions.ENABLE: { const polygon = this.polygonsManager.get(update.id); if (polygon) { polygon.enableEdit = true; } break; } case EditActions.SET_MANUALLY: { const polygon = this.polygonsManager.get(update.id); if (polygon) { polygon.setPointsManually(update.points); } break; } default: { return; } } } ngOnDestroy(): void { this.polygonsManager.clear(); } getPointSize(point: EditPoint) { return point.isVirtualEditPoint() ? 8 : 15; } >>>>>>> public Cesium = Cesium; public editPoints$ = new Subject<AcNotification>(); public editPolylines$ = new Subject<AcNotification>(); public editPolygons$ = new Subject<AcNotification>(); public appearance = new Cesium.PerInstanceColorAppearance({flat : true}); public attributes = {color : Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(0.2, 0.2, 0.5, 0.5))}; public polygonColor = new Cesium.Color(0.1, 0.5, 0.2, 0.4); public lineColor = new Cesium.Color(0, 0, 0, 0.6); @ViewChild('editPolygonsLayer') private editPolygonsLayer: AcLayerComponent; @ViewChild('editPointsLayer') private editPointsLayer: AcLayerComponent; @ViewChild('editPolylinesLayer') private editPolylinesLayer: AcLayerComponent; constructor(private polygonsEditor: PolygonsEditorService, private coordinateConverter: CoordinateConverter, private mapEventsManager: MapEventsManagerService, private cameraService: CameraService, private polygonsManager: PolygonsManagerService) { this.polygonsEditor.init(this.mapEventsManager, this.coordinateConverter, this.cameraService, polygonsManager); this.startListeningToEditorUpdates(); } private startListeningToEditorUpdates() { this.polygonsEditor.onUpdate().subscribe((update: PolygonEditUpdate) => { if (update.editMode === EditModes.CREATE || update.editMode === EditModes.CREATE_OR_EDIT) { this.handleCreateUpdates(update); } else if (update.editMode === EditModes.EDIT) { this.handleEditUpdates(update); } }); } handleCreateUpdates(update: PolygonEditUpdate) { switch (update.editAction) { case EditActions.INIT: { this.polygonsManager.createEditablePolygon( update.id, this.editPolygonsLayer, this.editPointsLayer, this.editPolylinesLayer, this.coordinateConverter, update.polygonOptions); break; } case EditActions.MOUSE_MOVE: { const polygon = this.polygonsManager.get(update.id); if (update.updatedPosition) { polygon.moveTempMovingPoint(update.updatedPosition); } break; } case EditActions.ADD_POINT: { const polygon = this.polygonsManager.get(update.id); if (update.updatedPosition) { polygon.addPoint(update.updatedPosition); } break; } case EditActions.ADD_LAST_POINT: { const polygon = this.polygonsManager.get(update.id); if (update.updatedPosition) { polygon.addLastPoint(update.updatedPosition); } break; } case EditActions.DISPOSE: { const polygon = this.polygonsManager.get(update.id); polygon.dispose(); break; } default: { return; } } } handleEditUpdates(update: PolygonEditUpdate) { switch (update.editAction) { case EditActions.INIT: { this.polygonsManager.createEditablePolygon( update.id, this.editPolygonsLayer, this.editPointsLayer, this.editPolylinesLayer, this.coordinateConverter, update.polygonOptions, update.positions ); break; } case EditActions.DRAG_POINT: { const polygon = this.polygonsManager.get(update.id); if (polygon && polygon.enableEdit) { polygon.movePoint(update.updatedPosition, update.updatedPoint); } break; } case EditActions.DRAG_POINT_FINISH: { const polygon = this.polygonsManager.get(update.id); if (polygon && polygon.enableEdit && update.updatedPoint.isVirtualEditPoint()) { polygon.addVirtualEditPoint(update.updatedPoint); } break; } case EditActions.REMOVE_POINT: { const polygon = this.polygonsManager.get(update.id); if (polygon && polygon.enableEdit) { polygon.removePoint(update.updatedPoint); } break; } case EditActions.DISABLE: { const polygon = this.polygonsManager.get(update.id); if (polygon) { polygon.enableEdit = false; } break; } case EditActions.DRAG_SHAPE: { const polygon = this.polygonsManager.get(update.id); if (polygon && polygon.enableEdit) { polygon.movePolygon(update.draggedPosition, update.updatedPosition) } break; } case EditActions.DRAG_SHAPE_FINISH: { const polygon = this.polygonsManager.get(update.id); if (polygon && polygon.enableEdit) { polygon.endMovePolygon() } break; } case EditActions.ENABLE: { const polygon = this.polygonsManager.get(update.id); if (polygon) { polygon.enableEdit = true; } break; } case EditActions.SET_MANUALLY: { const polygon = this.polygonsManager.get(update.id); if (polygon) { polygon.setPointsManually(update.points); } break; } default: { return; } } } ngOnDestroy(): void { this.polygonsManager.clear(); } getPointSize(point: EditPoint) { return point.isVirtualEditPoint() ? 8 : 15; }
<<<<<<< import { PolylinesEditorService } from './services/entity-editors/polyline-editor/polylines-editor.service'; import { PolylinesEditorComponent } from './components/polylines-editor/polylines-editor.component'; ======= import { CirclesEditorComponent } from './components/circles-editor/circles-editor.component'; import { CirclesEditorService } from './services/entity-editors/circles-editor/circles-editor.service'; import { PolygonsEditorService } from './services/entity-editors/polygons-editor/polygons-editor.service'; >>>>>>> import { CirclesEditorComponent } from './components/circles-editor/circles-editor.component'; import { CirclesEditorService } from './services/entity-editors/circles-editor/circles-editor.service'; import { PolygonsEditorService } from './services/entity-editors/polygons-editor/polygons-editor.service'; import { PolylinesEditorService } from './services/entity-editors/polyline-editor/polylines-editor.service'; import { PolylinesEditorComponent } from './components/polylines-editor/polylines-editor.component'; <<<<<<< PolylinesEditorComponent, ======= CirclesEditorComponent, >>>>>>> CirclesEditorComponent, PolylinesEditorComponent, <<<<<<< PolylinesEditorComponent, ======= CirclesEditorComponent, >>>>>>> CirclesEditorComponent, PolylinesEditorComponent, <<<<<<< PolylinesEditorService, ======= CirclesEditorService, >>>>>>> CirclesEditorService, PolylinesEditorService,
<<<<<<< import { Component, OnInit, ViewChild, ChangeDetectorRef } from '@angular/core'; import { Observable } from 'rxjs'; import { AcNotification } from '../../angular-cesium/models/ac-notification'; import { ActionType } from '../../angular-cesium/models/action-type.enum'; import { MapEventsManagerService } from '../../angular-cesium/services/map-events-mananger/map-events-manager'; import { AcEntity } from '../../angular-cesium/models/ac-entity'; import { AcLayerComponent } from '../../angular-cesium/components/ac-layer/ac-layer.component'; import { CesiumEvent } from '../../angular-cesium/services/map-events-mananger/consts/cesium-event.enum'; import { PickOptions } from '../../angular-cesium/services/map-events-mananger/consts/pickOptions.enum'; import { PlonterService } from '../../angular-cesium/services/plonter/plonter.service'; ======= import { Component, OnInit, ViewChild } from '@angular/core'; import { Observable } from 'rxjs'; import { AcNotification } from '../../angular-cesium/models/ac-notification'; import { ActionType } from '../../angular-cesium/models/action-type.enum'; import { MapEventsManagerService } from '../../angular-cesium/services/map-events-mananger/map-events-manager'; import { AcEntity } from '../../angular-cesium/models/ac-entity'; import { AcLayerComponent } from '../../angular-cesium/components/ac-layer/ac-layer.component'; import { CesiumEvent } from '../../angular-cesium/services/map-events-mananger/consts/cesium-event.enum'; import { PickOptions } from '../../angular-cesium/services/map-events-mananger/consts/pickOptions.enum'; >>>>>>> import { Component, OnInit, ViewChild } from '@angular/core'; import { Observable } from 'rxjs'; import { AcNotification } from '../../angular-cesium/models/ac-notification'; import { ActionType } from '../../angular-cesium/models/action-type.enum'; import { MapEventsManagerService } from '../../angular-cesium/services/map-events-mananger/map-events-manager'; import { AcEntity } from '../../angular-cesium/models/ac-entity'; import { AcLayerComponent } from '../../angular-cesium/components/ac-layer/ac-layer.component'; import { CesiumEvent } from '../../angular-cesium/services/map-events-mananger/consts/cesium-event.enum'; import { PickOptions } from '../../angular-cesium/services/map-events-mananger/consts/pickOptions.enum'; import { PlonterService } from '../../angular-cesium/services/plonter/plonter.service';
<<<<<<< import { PolylineEditorLayerComponent } from './components/editor-layer/polyline-example/polyline-editor-layer.component'; ======= import { PolygonsEditorLayerComponent } from './components/polygons-editor-layer/polygons-editor-layer.component'; import { CirclesEditorLayerComponent } from './components/circles-editor-layer/circles-editor-layer.component'; >>>>>>> import { PolygonsEditorLayerComponent } from './components/polygons-editor-layer/polygons-editor-layer.component'; import { CirclesEditorLayerComponent } from './components/circles-editor-layer/circles-editor-layer.component'; import { PolylineEditorLayerComponent } from './components/editor-layer/polyline-example/polyline-editor-layer.component'; <<<<<<< PolylineEditorLayerComponent, ======= PolygonsEditorLayerComponent, CirclesEditorLayerComponent, >>>>>>> PolygonsEditorLayerComponent, CirclesEditorLayerComponent, PolylineEditorLayerComponent,
<<<<<<< const mode3D = 3; const mode2D = 2; const modeColombus = 1; ======= const defaultTilt = true; >>>>>>> const defaultTilt = true; const mode3D = 3; const mode2D = 2; const modeColombus = 1; <<<<<<< maximumZoomDistance: defaultZooms }, mode: mode3D ======= maximumZoomDistance: defaultZooms, enableTilt: defaultTilt } >>>>>>> maximumZoomDistance: defaultZooms, enableTilt: defaultTilt }, mode: mode3D <<<<<<< it('Set to 2D mode', inject([CesiumService], (service: CesiumService) => { expect(service.getScene().mode).toBe(mode3D); service.morphTo2D(); expect(service.getScene().mode).toBe(mode2D); })); it('Set to 3D mode', inject([CesiumService], (service: CesiumService) => { expect(service.getScene().mode).toBe(mode3D); service.morphTo3D(); expect(service.getScene().mode).toBe(mode3D); })); it('Set to Columbus mode', inject([CesiumService], (service: CesiumService) => { expect(service.getScene().mode).toBe(mode3D); service.morphToColumbusView(); expect(service.getScene().mode).toBe(modeColombus); })); ======= it('Set EnableTilt', inject([CesiumService], (service: CesiumService) => { let newTilt = false; expect(service.getScene().screenSpaceCameraController.enableTilt).toBe(defaultTilt); service.setEnableTilt(newTilt); expect(service.getScene().screenSpaceCameraController.enableTilt).toBe(newTilt); })); >>>>>>> it('Set EnableTilt', inject([CesiumService], (service: CesiumService) => { let newTilt = false; expect(service.getScene().screenSpaceCameraController.enableTilt).toBe(defaultTilt); service.setEnableTilt(newTilt); expect(service.getScene().screenSpaceCameraController.enableTilt).toBe(newTilt); })); it('Set to 2D mode', inject([CesiumService], (service: CesiumService) => { expect(service.getScene().mode).toBe(mode3D); service.morphTo2D(); expect(service.getScene().mode).toBe(mode2D); })); it('Set to 3D mode', inject([CesiumService], (service: CesiumService) => { expect(service.getScene().mode).toBe(mode3D); service.morphTo3D(); expect(service.getScene().mode).toBe(mode3D); })); it('Set to Columbus mode', inject([CesiumService], (service: CesiumService) => { expect(service.getScene().mode).toBe(mode3D); service.morphToColumbusView(); expect(service.getScene().mode).toBe(modeColombus); }));
<<<<<<< export * from './components/polylines-editor/polylines-editor.component'; export * from './components/hippodrome-editor/hippodrome-editor.component'; ======= export * from './components/circles-editor/circles-editor.component'; export * from './components/polylines-editor/polylines-editor.component'; >>>>>>> export * from './components/circles-editor/circles-editor.component'; export * from './components/polylines-editor/polylines-editor.component'; export * from './components/hippodrome-editor/hippodrome-editor.component';
<<<<<<< private arcGisMapServerProvider: MapLayerProviderOptions; private position: any; private positions: any; private redMatirial: any; private aquamarine: any; private longitude: number; private latitude: number; @ViewChild(AcLabelDescComponent) label: AcLabelDescComponent; @ViewChild(AcDynamicPolylineDescComponent) polyline: AcDynamicPolylineDescComponent; ======= arcGisMapServerProvider = MapLayerProviderOptions.ArcGisMapServer; flyToOptions = { duration: 2, destination: Cesium.Cartesian3.fromDegrees(-117.16, 32.71, 15000.0), }; >>>>>>> private arcGisMapServerProvider: MapLayerProviderOptions; flyToOptions = { duration: 2, destination: Cesium.Cartesian3.fromDegrees(-117.16, 32.71, 15000.0), }; private position: any; private positions: any; private redMatirial: any; private aquamarine: any; private longitude: number; private latitude: number; @ViewChild(AcLabelDescComponent) label: AcLabelDescComponent; @ViewChild(AcDynamicPolylineDescComponent) polyline: AcDynamicPolylineDescComponent;
<<<<<<< export * from './models/editable-polyline'; ======= export * from './models/editable-circle'; >>>>>>> export * from './models/editable-circle'; export * from './models/editable-polyline'; <<<<<<< export * from './models/polygon-edit-options'; export * from './models/polyline-edit-options'; ======= export * from './models/circle-edit-update'; export * from './models/basic-edit-update'; export * from './models/polygon-edit-options'; >>>>>>> export * from './models/circle-edit-update'; export * from './models/basic-edit-update'; export * from './models/polygon-edit-options'; export * from './models/polyline-edit-options';
<<<<<<< export * from './services/entity-editors/polygons-editor/polygons-editor.service'; export * from './services/entity-editors/polyline-editor/polylines-editor.service'; ======= export * from './services/entity-editors/polygons-editor/polygons-editor.service'; export * from './services/entity-editors/circles-editor/circles-editor.service'; >>>>>>> export * from './services/entity-editors/polygons-editor/polygons-editor.service'; export * from './services/entity-editors/circles-editor/circles-editor.service'; export * from './services/entity-editors/polyline-editor/polylines-editor.service';
<<<<<<< export class AcMapLayerProviderComponent implements OnInit { private createWebMapServiceProvider(options) { ======= export class AcMapLayerProviderComponent implements OnInit, OnChanges, OnDestroy { private static createWebMapServiceProvider(options) { >>>>>>> export class AcMapLayerProviderComponent implements OnInit, OnChanges, OnDestroy { private createWebMapServiceProvider(options) { <<<<<<< provider = this.createWebMapServiceProvider(this.options); ======= this.layerProvider = AcMapLayerProviderComponent.createWebMapServiceProvider(this.options); >>>>>>> this.layerProvider = this.createWebMapServiceProvider(this.options); <<<<<<< provider = this.createWebMapTileServiceProvider(this.options); ======= this.layerProvider = AcMapLayerProviderComponent.createWebMapTileServiceProvider(this.options); >>>>>>> this.layerProvider = this.createWebMapTileServiceProvider(this.options); <<<<<<< provider = this.createArcGisMapServerProvider(this.options); ======= this.layerProvider = AcMapLayerProviderComponent.createArcGisMapServerProvider(this.options); >>>>>>> this.layerProvider = this.createArcGisMapServerProvider(this.options); <<<<<<< provider = this.createOfflineMapProvider(); ======= this.layerProvider = AcMapLayerProviderComponent.createOfflineMapProvider(); >>>>>>> this.layerProvider = this.createOfflineMapProvider();
<<<<<<< init(mapContainer: HTMLElement) { this.ngZone.runOutsideAngular(() => { window['CESIUM_BASE_URL'] = './assets/Cesium'; this.cesiumViewer = new this.cesium.Viewer(mapContainer, { // Poor internet connection - use default globe image, TODO: should be removed // imageryProvider: Cesium.createTileMapServiceImageryProvider({ // url: Cesium.buildModuleUrl('Assets/Textures/NaturalEarthII') // }), baseLayerPicker: false, geocoder: false }); }); } ======= init(mapContainer: HTMLElement) { this.ngZone.runOutsideAngular(() => { window['CESIUM_BASE_URL'] = './assets/Cesium'; this.cesiumViewer = new this.cesium.Viewer(mapContainer, { // Poor internet connection - use default globe image, TODO: should be removed imageryProvider: Cesium.createTileMapServiceImageryProvider({ url: Cesium.buildModuleUrl('Assets/Textures/NaturalEarthII') }), baseLayerPicker: false, geocoder: false }); }); } >>>>>>> init(mapContainer: HTMLElement) { this.ngZone.runOutsideAngular(() => { window['CESIUM_BASE_URL'] = './assets/Cesium'; this.cesiumViewer = new this.cesium.Viewer(mapContainer, { baseLayerPicker: false, geocoder: false }); }); }
<<<<<<< import { HippodromeEditorLayerComponent } from './components/editor-layer/hippodrome-example/hippodrome-editor-layer.component'; ======= import { HeatmapLayerComponent } from './components/heatmap-layer/heatmap-layer.component'; >>>>>>> import { HeatmapLayerComponent } from './components/heatmap-layer/heatmap-layer.component'; import { HippodromeEditorLayerComponent } from './components/editor-layer/hippodrome-example/hippodrome-editor-layer.component'; <<<<<<< HippodromeEditorLayerComponent, ======= HeatmapLayerComponent, >>>>>>> HeatmapLayerComponent, HippodromeEditorLayerComponent,
<<<<<<< import { AcPolygonDescComponent } from './components/ac-polygon-desc/ac-polygon-desc.component'; ======= import { AcDefaultPlonterComponent } from './components/ac-default-plonter/ac-default-plonter.component'; >>>>>>> import { AcPolygonDescComponent } from './components/ac-polygon-desc/ac-polygon-desc.component'; import { AcDefaultPlonterComponent } from './components/ac-default-plonter/ac-default-plonter.component'; <<<<<<< AcArcComponent, AcPolygonDescComponent, ======= AcArcComponent, AcDefaultPlonterComponent >>>>>>> AcArcComponent, AcPolygonDescComponent, AcDefaultPlonterComponent,
<<<<<<< import { SelectionLayerComponent } from './components/selection-layer/selection-layer.component'; ======= import { ContextMenuComponent } from './components/context-menu/context-menu.component'; import { ContextMenuLayerComponent } from './components/context-menu-layer/context-menu-layer.component'; >>>>>>> import { SelectionLayerComponent } from './components/selection-layer/selection-layer.component'; import { ContextMenuComponent } from './components/context-menu/context-menu.component'; import { ContextMenuLayerComponent } from './components/context-menu-layer/context-menu-layer.component'; <<<<<<< SelectionLayerComponent, ======= ContextMenuComponent, ContextMenuLayerComponent, >>>>>>> ContextMenuComponent, ContextMenuLayerComponent, SelectionLayerComponent,
<<<<<<< import { PolygonsEditorLayerComponent } from './components/polygons-editor-layer/polygons-editor-layer.component'; import { CirclesEditorLayerComponent } from './components/circles-editor-layer/circles-editor-layer.component'; ======= import { EditorLayerComponent } from './components/editor-layer/editor-layer.component'; import { SelectionLayerComponent } from './components/selection-layer/selection-layer.component'; import { ContextMenuComponent } from './components/context-menu/context-menu.component'; import { ContextMenuLayerComponent } from './components/context-menu-layer/context-menu-layer.component'; >>>>>>> import { EditorLayerComponent } from './components/editor-layer/editor-layer.component'; import { SelectionLayerComponent } from './components/selection-layer/selection-layer.component'; import { ContextMenuComponent } from './components/context-menu/context-menu.component'; import { ContextMenuLayerComponent } from './components/context-menu-layer/context-menu-layer.component'; import { PolygonsEditorLayerComponent } from './components/polygons-editor-layer/polygons-editor-layer.component'; import { CirclesEditorLayerComponent } from './components/circles-editor-layer/circles-editor-layer.component'; <<<<<<< PolygonsEditorLayerComponent, CirclesEditorLayerComponent, ======= EditorLayerComponent, ContextMenuComponent, ContextMenuLayerComponent, SelectionLayerComponent, >>>>>>> EditorLayerComponent, ContextMenuComponent, ContextMenuLayerComponent, SelectionLayerComponent, PolygonsEditorLayerComponent, CirclesEditorLayerComponent,
<<<<<<< import { PolygonPerformanceTestComponent } from './components/polygon-layer/polygon-performance-test/polygon-performance-test.component'; ======= import { KeyboardControlLayerComponent } from './components/keyboard-control-layer/keyboard-control-layer.component'; >>>>>>> import { PolygonPerformanceTestComponent } from './components/polygon-layer/polygon-performance-test/polygon-performance-test.component'; import { KeyboardControlLayerComponent } from './components/keyboard-control-layer/keyboard-control-layer.component'; <<<<<<< PolygonPerformanceTestComponent, ======= KeyboardControlLayerComponent, >>>>>>> PolygonPerformanceTestComponent, KeyboardControlLayerComponent,
<<<<<<< import { AcStaticEllipseDescComponent } from './components/static-dynamic/ac-static-ellipse-desc/ac-static-ellipse-desc.component'; import { AcDynamicEllipseDescComponent } from './components/static-dynamic/ac-dynamic-ellipse-desc/ac-dynamic-ellipse-desc.component'; import { AcDynamicPolylineDescComponent } from './components/static-dynamic/ac-dynamic-polyline-desc/ac-dynamic-polyline-desc.component'; import { AcStaticPolygonDescComponent } from './components/static-dynamic/ac-static-polygon-desc/ac-static-polygon-desc.component'; import { AcStaticCircleDescComponent } from './components/static-dynamic/ac-static-circle-desc/ac-static-circle-desc.component'; import { AcDynamicCircleDescComponent } from './components/static-dynamic/ac-dynamic-circle-desc/ac-dynamic-circle-desc.component'; import { AcStaticPolylineDescComponent } from './components/static-dynamic/ac-static-polyline-desc/ac-static-polyline-desc.component'; ======= import { ViewersManagerService } from './services/viewers-service/viewers-manager.service'; >>>>>>> import { ViewersManagerService } from './services/viewers-service/viewers-manager.service'; import { AcStaticEllipseDescComponent } from './components/static-dynamic/ac-static-ellipse-desc/ac-static-ellipse-desc.component'; import { AcDynamicEllipseDescComponent } from './components/static-dynamic/ac-dynamic-ellipse-desc/ac-dynamic-ellipse-desc.component'; import { AcDynamicPolylineDescComponent } from './components/static-dynamic/ac-dynamic-polyline-desc/ac-dynamic-polyline-desc.component'; import { AcStaticPolygonDescComponent } from './components/static-dynamic/ac-static-polygon-desc/ac-static-polygon-desc.component'; import { AcStaticCircleDescComponent } from './components/static-dynamic/ac-static-circle-desc/ac-static-circle-desc.component'; import { AcDynamicCircleDescComponent } from './components/static-dynamic/ac-dynamic-circle-desc/ac-dynamic-circle-desc.component'; import { AcStaticPolylineDescComponent } from './components/static-dynamic/ac-static-polyline-desc/ac-static-polyline-desc.component';
<<<<<<< import { AcArrayDescComponent } from './components/ac-array-desc/ac-array-desc'; ======= import { AcPointPrimitiveDescComponent } from './components/ac-point-primitive-desc/ac-point-primitive-desc.component'; >>>>>>> import { AcArrayDescComponent } from './components/ac-array-desc/ac-array-desc'; import { AcPointPrimitiveDescComponent } from './components/ac-point-primitive-desc/ac-point-primitive-desc.component'; <<<<<<< AcArrayDescComponent, ======= AcPointPrimitiveDescComponent, AcHtmlDescComponent, AcHtmlDirective, AcHtmlContainerDirective, >>>>>>> AcPointPrimitiveDescComponent, AcHtmlDescComponent, AcHtmlDirective, AcHtmlContainerDirective, AcArrayDescComponent, <<<<<<< AcArrayDescComponent, ======= AcPointPrimitiveDescComponent, AcHtmlDescComponent, >>>>>>> AcPointPrimitiveDescComponent, AcHtmlDescComponent, AcArrayDescComponent,
<<<<<<< private mapContainer: HTMLElement; ======= @Input() flyTo: any; >>>>>>> @Input() flyTo: any; private mapContainer: HTMLElement;
<<<<<<< import { EditorLayerComponent } from './components/editor-layer/editor-layer.component'; import { HtmlLayerComponent } from './components/html-layer/html-layer.component'; ======= import { SelectionLayerComponent } from './components/selection-layer/selection-layer.component'; import { ContextMenuComponent } from './components/context-menu/context-menu.component'; import { ContextMenuLayerComponent } from './components/context-menu-layer/context-menu-layer.component'; import { PolygonsEditorLayerComponent } from './components/editor-layer/polygons-editor-layer/polygons-editor-layer.component'; import { CirclesEditorLayerComponent } from './components/editor-layer/circles-editor-layer/circles-editor-layer.component'; import { PolylineEditorLayerComponent } from './components/editor-layer/polyline-example/polyline-editor-layer.component'; >>>>>>> import { EditorLayerComponent } from './components/editor-layer/editor-layer.component'; import { HtmlLayerComponent } from './components/html-layer/html-layer.component'; import { SelectionLayerComponent } from './components/selection-layer/selection-layer.component'; import { ContextMenuComponent } from './components/context-menu/context-menu.component'; import { ContextMenuLayerComponent } from './components/context-menu-layer/context-menu-layer.component'; import { PolygonsEditorLayerComponent } from './components/editor-layer/polygons-editor-layer/polygons-editor-layer.component'; import { CirclesEditorLayerComponent } from './components/editor-layer/circles-editor-layer/circles-editor-layer.component'; import { PolylineEditorLayerComponent } from './components/editor-layer/polyline-example/polyline-editor-layer.component'; <<<<<<< EditorLayerComponent, HtmlLayerComponent ======= ContextMenuComponent, ContextMenuLayerComponent, SelectionLayerComponent, PolygonsEditorLayerComponent, CirclesEditorLayerComponent, PolylineEditorLayerComponent, >>>>>>> ContextMenuComponent, ContextMenuLayerComponent, SelectionLayerComponent, PolygonsEditorLayerComponent, CirclesEditorLayerComponent, PolylineEditorLayerComponent, EditorLayerComponent, HtmlLayerComponent
<<<<<<< import { Darknode, generateProposeMessage, generatePrevoteMessage, generatePrecommitMessage, generateSecretMessage } from "./Validate"; ======= import { Darknode, generatePrecommitMessage, generatePrevoteMessage, generateProposeMessage } from "./Validate"; >>>>>>> import { Darknode, generatePrecommitMessage, generatePrevoteMessage, generateProposeMessage, generateSecretMessage } from "./Validate";
<<<<<<< await updateCurrentFileIfPython(activeTextEditor); ======= updateCurrentFileIfPython(vscode.window.activeTextEditor); >>>>>>> await updateCurrentFileIfPython(vscode.window.activeTextEditor);
<<<<<<< if (currentPanel) { console.log("Sending clearing state command"); currentPanel.webview.postMessage({ command: "reset-state" }); } ======= if (currentPanel) { console.info("Sending clearing state command"); currentPanel.webview.postMessage({ command: "reset-state" }); } >>>>>>> if (currentPanel) { console.info("Sending clearing state command"); currentPanel.webview.postMessage({ command: "reset-state" }); } <<<<<<< if (currentPanel && message.length > 0 && message != oldMessage) { oldMessage = message; let messageToWebview; // Check the message is a JSON try { messageToWebview = JSON.parse(message); // Check the JSON is a state switch (messageToWebview.type) { case "state": console.log( `Process state output = ${messageToWebview.data}` ); currentPanel.webview.postMessage({ command: "set-state", state: JSON.parse(messageToWebview.data) }); break; default: console.log( `Non-state JSON output from the process : ${messageToWebview}` ); break; } } catch (err) { console.log(`Non-JSON output from the process : ${message}`); logToOutputChannel(outChannel, `[PRINT] ${message}\n`); } ======= if (currentPanel && message.length > 0 && message != oldState) { console.log("Process output = ", message); currentPanel.webview.postMessage({ command: "set-state", state: JSON.parse(message) }); oldState = message; >>>>>>> if (currentPanel && message.length > 0 && message != oldMessage) { oldMessage = message; let messageToWebview; // Check the message is a JSON try { messageToWebview = JSON.parse(message); // Check the JSON is a state switch (messageToWebview.type) { case "state": console.log( `Process state output = ${messageToWebview.data}` ); currentPanel.webview.postMessage({ command: "set-state", state: JSON.parse(messageToWebview.data) }); break; default: console.log( `Non-state JSON output from the process : ${messageToWebview}` ); break; } } catch (err) { console.log(`Non-JSON output from the process : ${message}`); logToOutputChannel(outChannel, `[PRINT] ${message}\n`); } <<<<<<< console.log(`Error from the Python process through stderr: ${data}`); logToOutputChannel(outChannel, `[ERROR] ${data} \n`, true); if (currentPanel) { console.log("Sending clearing state command"); currentPanel.webview.postMessage({ command: "reset-state" }); } ======= console.error(`Error from the Python process through stderr: ${data}`); >>>>>>> console.error(`Error from the Python process through stderr: ${data}`); logToOutputChannel(outChannel, `[ERROR] ${data} \n`, true); if (currentPanel) { console.log("Sending clearing state command"); currentPanel.webview.postMessage({ command: "reset-state" }); }
<<<<<<< import { useMemo } from 'react'; import useOssFragment from './useOssFragment'; import { PaginationFunction } from './RelayHooksType'; ======= >>>>>>> import { useMemo } from 'react';
<<<<<<< deleteText?: string buttonDeletePosition?: string, buttonDeleteStyle?: object, ======= deleteText?: string, delayBeforeOnComplete?: number, inputViewStyle?: ViewStyle, keyboardViewStyle?: ViewStyle, keyboardViewTextStyle?: TextStyle, keyboardContainerStyle?: ViewStyle >>>>>>> deleteText?: string buttonDeletePosition?: string, buttonDeleteStyle?: object, delayBeforeOnComplete?: number, inputViewStyle?: ViewStyle, keyboardViewStyle?: ViewStyle, keyboardViewTextStyle?: TextStyle, keyboardContainerStyle?: ViewStyle
<<<<<<< test( 'changes the href to another bundle if strategy moved it', async () => { const bundler = new Bundler(); // This strategy moves a file to a different bundle. const strategy = (bundles: Bundle[]): Bundle[] => { return [ new Bundle( new Set(['test/html/default.html']), new Set(['test/html/default.html'])), new Bundle( new Set(), // new Set(['test/html/imports/simple-import.html'])) ]; }; const manifest = await bundler.generateManifest( ['test/html/default.html'], strategy); const documents = await bundler.bundle(manifest); const document = documents.get('test/html/default.html')!; assert(document); // We've moved the 'imports/simple-import.html' into a shared bundle // so a link to import it now points to the shared bundle instead. const linkTag = dom5.query( document.ast!, preds.AND( preds.hasTagName('link'), preds.hasAttrValue('rel', 'import')))!; assert(linkTag); assert.equal( dom5.getAttribute(linkTag, 'href'), '../../shared_bundle_1.html'); }); ======= test('changes the href to another bundle if strategy moved it', async() => { const bundler = new Bundler(); // This strategy moves a file to a different bundle. const strategy = (bundles: Bundle[]): Bundle[] => { return [ new Bundle( new Set(['test/html/default.html']), new Set(['test/html/default.html'])), new Bundle( new Set(), // new Set(['test/html/imports/simple-import.html'])) ]; }; const manifest = await bundler.generateManifest(['test/html/default.html'], strategy); const documents = await bundler.bundle(manifest); const document = documents.get('test/html/default.html')!; assert(document); // We've moved the 'imports/simple-import.html' into a shared bundle // so a link to import it now points to the shared bundle instead. const linkTag = dom5.query( document.ast!, preds.AND( preds.hasTagName('link'), preds.hasAttrValue('rel', 'import')))!; assert(linkTag); assert.equal( dom5.getAttribute(linkTag, 'href'), '../../shared_bundle_1.html'); const shared = documents.get('shared_bundle_1.html')!; assert(shared); assert.isOk(dom5.query( shared.ast, dom5.predicates.hasAttrValue('id', 'my-element'))); }); test('bundle documents should not have tags added to them', async() => { const ast = await bundle('test/html/imports/simple-import.html'); assert.isNull(dom5.query( ast, dom5.predicates.OR( dom5.predicates.hasTagName('html'), dom5.predicates.hasTagName('head'), dom5.predicates.hasTagName('body')))); }); >>>>>>> test( 'changes the href to another bundle if strategy moved it', async () => { const bundler = new Bundler(); // This strategy moves a file to a different bundle. const strategy = (bundles: Bundle[]): Bundle[] => { return [ new Bundle( new Set(['test/html/default.html']), new Set(['test/html/default.html'])), new Bundle( new Set(), // new Set(['test/html/imports/simple-import.html'])) ]; }; const manifest = await bundler.generateManifest( ['test/html/default.html'], strategy); const documents = await bundler.bundle(manifest); const document = documents.get('test/html/default.html')!; assert(document); // We've moved the 'imports/simple-import.html' into a shared bundle // so a link to import it now points to the shared bundle instead. const linkTag = dom5.query( document.ast!, preds.AND( preds.hasTagName('link'), preds.hasAttrValue('rel', 'import')))!; assert(linkTag); assert.equal( dom5.getAttribute(linkTag, 'href'), '../../shared_bundle_1.html'); const shared = documents.get('shared_bundle_1.html')!; assert(shared); assert.isOk(dom5.query( shared.ast, dom5.predicates.hasAttrValue('id', 'my-element'))); }); test('bundle documents should not have tags added to them', async () => { const ast = await bundle('test/html/imports/simple-import.html'); assert.isNull(dom5.query( ast, dom5.predicates.OR( dom5.predicates.hasTagName('html'), dom5.predicates.hasTagName('head'), dom5.predicates.hasTagName('body')))); });
<<<<<<< ): Type<A & B> { abstract class IntersectionClassType { constructor() { inheritPropertyInitializers(this, classARef); inheritPropertyInitializers(this, classBRef); } } ======= ): MappedType<A & B> { abstract class IntersectionClassType {} >>>>>>> ): MappedType<A & B> { abstract class IntersectionClassType { constructor() { inheritPropertyInitializers(this, classARef); inheritPropertyInitializers(this, classBRef); } }
<<<<<<< export * from './sidebar'; export * from './contentTop'; ======= export * from './sidebar'; export * from './baPanel'; >>>>>>> export * from './sidebar'; export * from './baPanel'; export * from './contentTop';
<<<<<<< ...ROUTER_PROVIDERS, {provide: LocationStrategy, useClass: HashLocationStrategy} ======= ...APP_ROUTER_PROVIDERS, {provide: LocationStrategy, useClass: HashLocationStrategy } >>>>>>> ...APP_ROUTER_PROVIDERS, {provide: LocationStrategy, useClass: HashLocationStrategy} {provide: LocationStrategy, useClass: HashLocationStrategy }
<<<<<<< ): Type<Omit<T, typeof keys[number]>> { ======= ): MappedType<Omit<T, typeof keys[number]>> { abstract class OmitClassType {} >>>>>>> ): MappedType<Omit<T, typeof keys[number]>> {
<<<<<<< import {ROUTER_DIRECTIVES} from '@angular/router-deprecated'; // Angular 2 forms import { REACTIVE_FORM_DIRECTIVES } from '@angular/forms'; ======= import {ROUTER_DIRECTIVES} from '@angular/router'; >>>>>>> import {ROUTER_DIRECTIVES} from '@angular/router'; // Angular 2 forms import { REACTIVE_FORM_DIRECTIVES } from '@angular/forms';
<<<<<<< interactive?: boolean; ======= userId: string; >>>>>>> userId: string; interactive?: boolean; <<<<<<< pullPolicy, interactive = false ======= pullPolicy, userId >>>>>>> pullPolicy, userId, interactive = false
<<<<<<< import { getUserId } from "magda-typescript-common/src/session/GetUserId"; import Registry from "magda-typescript-common/src/registry/AuthorizedRegistryClient"; import { AuthorizedRegistryOptions } from "magda-typescript-common/src/registry/AuthorizedRegistryClient"; ======= const { fileParser } = require("express-multipart-file-parser"); >>>>>>> import { getUserId } from "magda-typescript-common/src/session/GetUserId"; import Registry from "magda-typescript-common/src/registry/AuthorizedRegistryClient"; import { AuthorizedRegistryOptions } from "magda-typescript-common/src/registry/AuthorizedRegistryClient"; const { fileParser } = require("express-multipart-file-parser"); <<<<<<< tenantId: number; ======= uploadLimit: string; >>>>>>> tenantId: number; uploadLimit: string;
<<<<<<< import { Contact } from "Components/Editing/Editors/contactEditor"; import { licenseLevel, ContactPointDisplayOption } from "constants/DatasetConstants"; ======= import { licenseLevel } from "constants/DatasetConstants"; >>>>>>> import { licenseLevel, ContactPointDisplayOption } from "constants/DatasetConstants"; <<<<<<< contactPointFull?: Contact[]; ======= owningOrgUnitId?: string; contactPointDisplay?: string; >>>>>>> owningOrgUnitId?: string; contactPointDisplay?: string; <<<<<<< languages: ["eng"] ======= languages: ["eng"], contactPointDisplay: "role", owningOrgUnitId: user.orgUnitId >>>>>>> languages: ["eng"], owningOrgUnitId: user.orgUnitId
<<<<<<< run((code: number) => { Object.values(registry.records).forEach( (record: any) => { record.sourceTag = "stag"; if (record.aspects && record.aspects.source) { record.aspects.source.url = record.aspects.source.url.replace( `http://localhost:${catalogPort}`, "SOURCE" ); } ======= return run().then(() => { Object.values(registry.records).forEach(record => { record.sourceTag = "stag"; if (record.aspects && record.aspects.source) { record.aspects.source.url = record.aspects.source.url.replace( `http://localhost:${catalogPort}`, "SOURCE" ); >>>>>>> return run().then(() => { Object.values(registry.records).forEach( (record: any) => { record.sourceTag = "stag"; if (record.aspects && record.aspects.source) { record.aspects.source.url = record.aspects.source.url.replace( `http://localhost:${catalogPort}`, "SOURCE" ); }
<<<<<<< import AspectBuilder from "@magda/typescript-common/dist/AspectBuilder"; import Ckan from "./Ckan"; import createTransformer from "./createTransformer"; import JsonConnector from "@magda/typescript-common/dist/JsonConnector"; import Registry from "@magda/typescript-common/dist/registry/AuthorizedRegistryClient"; ======= >>>>>>> import AspectBuilder from "@magda/typescript-common/dist/AspectBuilder"; import Ckan from "./Ckan"; import createTransformer from "./createTransformer"; import JsonConnector from "@magda/typescript-common/dist/JsonConnector"; import Registry from "@magda/typescript-common/dist/registry/AuthorizedRegistryClient"; <<<<<<< const argv = yargs .config() .help() .option("name", { describe: "The name of this connector, to be displayed to users to indicate the source of datasets.", type: "string", demandOption: true }) .option("sourceUrl", { describe: "The base URL of the CKAN server, without /api/...", type: "string", demandOption: true }) .option("pageSize", { describe: "The number of datasets per page to request from the CKAN server.", type: "number", default: 1000 }) .option("ignoreHarvestSources", { describe: "An array of harvest sources to ignore. Datasets from these harvest soures will not be added to the registry.", type: "array", default: [] }) .option("registryUrl", { describe: "The base URL of the registry to which to write data from CKAN.", type: "string", default: "http://localhost:6101/v0" }) .option('interactive', { describe: 'Run the connector in an interactive mode with a REST API, instead of running a batch connection job.', type: 'boolean', default: false }) .option('listenPort', { describe: 'The port on which to run the REST API when in interactive model.', type: 'number', default: 6113 }) .option('timeout', { describe: 'When in --interactive mode, the time in seconds to wait without servicing an REST API request before shutting down. If 0, there is no timeout and the process will never shut down.', type: 'number', default: 0 }) .option("jwtSecret", { describe: "The shared secret for intra-network communication", type: "string", demand: true, default: process.env.JWT_SECRET || process.env.npm_package_config_jwtSecret }) .option("userId", { describe: "The user id to use when making authenticated requests to the registry", type: "string", demand: true, default: process.env.USER_ID || process.env.npm_package_config_userId }).argv; ======= import AspectBuilder from "@magda/typescript-common/dist/AspectBuilder"; import Ckan from "./Ckan"; import CkanConnector from "./CkanConnector"; import Registry from "@magda/typescript-common/dist/registry/AuthorizedRegistryClient"; import addJwtSecretFromEnvVar from "@magda/typescript-common/dist/session/addJwtSecretFromEnvVar"; const argv = addJwtSecretFromEnvVar( yargs .config() .help() .option("name", { describe: "The name of this connector, to be displayed to users to indicate the source of datasets.", type: "string", demandOption: true }) .option("sourceUrl", { describe: "The base URL of the CKAN server, without /api/...", type: "string", demandOption: true }) .option("pageSize", { describe: "The number of datasets per page to request from the CKAN server.", type: "number", default: 1000 }) .option("ignoreHarvestSources", { describe: "An array of harvest sources to ignore. Datasets from these harvest soures will not be added to the registry.", type: "array", default: [] }) .option("registryUrl", { describe: "The base URL of the registry to which to write data from CKAN.", type: "string", default: "http://localhost:6101/v0" }) .option("jwtSecret", { describe: "The shared secret for intra-network communication", type: "string" }) .option("userId", { describe: "The user id to use when making authenticated requests to the registry", type: "string", demand: true, default: process.env.USER_ID || process.env.npm_package_config_userId }).argv ); >>>>>>> import AspectBuilder from "@magda/typescript-common/dist/AspectBuilder"; import Ckan from "./Ckan"; import CkanConnector from "./CkanConnector"; import Registry from "@magda/typescript-common/dist/registry/AuthorizedRegistryClient"; import addJwtSecretFromEnvVar from "@magda/typescript-common/dist/session/addJwtSecretFromEnvVar"; const argv = addJwtSecretFromEnvVar( yargs .config() .help() .option("name", { describe: "The name of this connector, to be displayed to users to indicate the source of datasets.", type: "string", demandOption: true }) .option("sourceUrl", { describe: "The base URL of the CKAN server, without /api/...", type: "string", demandOption: true }) .option("pageSize", { describe: "The number of datasets per page to request from the CKAN server.", type: "number", default: 1000 }) .option("ignoreHarvestSources", { describe: "An array of harvest sources to ignore. Datasets from these harvest soures will not be added to the registry.", type: "array", default: [] }) .option("registryUrl", { describe: "The base URL of the registry to which to write data from CKAN.", type: "string", default: "http://localhost:6101/v0" }) .option('interactive', { describe: 'Run the connector in an interactive mode with a REST API, instead of running a batch connection job.', type: 'boolean', default: false }) .option('listenPort', { describe: 'The port on which to run the REST API when in interactive model.', type: 'number', default: 6113 }) .option('timeout', { describe: 'When in --interactive mode, the time in seconds to wait without servicing an REST API request before shutting down. If 0, there is no timeout and the process will never shut down.', type: 'number', default: 0 }) .option("jwtSecret", { describe: "The shared secret for intra-network communication", type: "string" }) .option("userId", { describe: "The user id to use when making authenticated requests to the registry", type: "string", demand: true, default: process.env.USER_ID || process.env.npm_package_config_userId }).argv );
<<<<<<< import Csw from "./Csw"; import JsonConnector from "@magda/typescript-common/dist/JsonConnector"; import Registry from "@magda/typescript-common/dist/registry/AuthorizedRegistryClient"; import createTransformer from "./createTransformer"; ======= import * as moment from "moment"; import * as URI from "urijs"; import * as lodash from "lodash"; import * as jsonpath from "jsonpath"; import * as yargs from "yargs"; import Registry from "@magda/typescript-common/dist/registry/AuthorizedRegistryClient"; import addJwtSecretFromEnvVar from "@magda/typescript-common/dist/session/addJwtSecretFromEnvVar"; >>>>>>> import addJwtSecretFromEnvVar from "@magda/typescript-common/dist/session/addJwtSecretFromEnvVar"; import Csw from "./Csw"; import JsonConnector from "@magda/typescript-common/dist/JsonConnector"; import Registry from "@magda/typescript-common/dist/registry/AuthorizedRegistryClient"; import createTransformer from "./createTransformer";
<<<<<<< ckanExport?: CkanExportAspectType; ======= access: Access; >>>>>>> ckanExport?: CkanExportAspectType; access: Access; <<<<<<< const ckanExport: CkanExportAspectType = aspects["ckan-export"] ? aspects["ckan-export"] : { [config.defaultCkanServer]: { status: "withdraw", hasCreated: false, exportRequired: false, exportAttempted: false } }; const distributions = distribution["distributions"].map(d => { ======= const distributions = distribution["distributions"].map((d) => { >>>>>>> const ckanExport: CkanExportAspectType = aspects["ckan-export"] ? aspects["ckan-export"] : { [config.defaultCkanServer]: { status: "withdraw", hasCreated: false, exportRequired: false, exportAttempted: false } }; const distributions = distribution["distributions"].map((d) => { <<<<<<< datasetInfo["accrualPeriodicityRecurrenceRule"] || "", ckanExport ======= datasetInfo["accrualPeriodicityRecurrenceRule"] || "", access: aspects["access"] >>>>>>> datasetInfo["accrualPeriodicityRecurrenceRule"] || "", ckanExport, access: aspects["access"]
<<<<<<< let temporalCoverage: TemporalCoverage | undefined; let spatialCoverage: SpatialCoverage | undefined; const rows = XLSX.utils.sheet_to_json(worksheet, { raw: false }); ======= const rows = XLSX.utils.sheet_to_json(worksheet, { raw: true }); >>>>>>> let temporalCoverage: TemporalCoverage | undefined; let spatialCoverage: SpatialCoverage | undefined; const rows = XLSX.utils.sheet_to_json(worksheet, { raw: true }); <<<<<<< temporalCoverage = { intervals: [aggregateDates(rows, headers, config)].filter( (i): i is Interval => !!i ) ======= output.temporalCoverage = { intervals: [aggregateDates(rows, headers)] >>>>>>> temporalCoverage = { intervals: [aggregateDates(rows, headers, config)].filter( (i): i is Interval => !!i ) <<<<<<< startDateHeadersInOrder.forEach((header) => { rows.forEach((row) => { ======= rows.forEach(row => { startDateHeadersInOrder.forEach(header => { >>>>>>> rows.forEach((row) => { startDateHeadersInOrder.forEach((header) => { <<<<<<< endDateHeadersInOrder.forEach((header) => { rows.forEach((row) => { ======= endDateHeadersInOrder.forEach(header => { >>>>>>> endDateHeadersInOrder.forEach((header) => {
<<<<<<< import Csw from './Csw'; import JsonConnector from '@magda/typescript-common/dist/JsonConnector'; import Registry from '@magda/typescript-common/dist/Registry'; import createTransformer from './createTransformer'; import datasetAspectBuilders from './datasetAspectBuilders'; import distributionAspectBuilders from './distributionAspectBuilders'; import organizationAspectBuilders from './organizationAspectBuilders'; import * as yargs from 'yargs'; ======= import Csw from "./Csw"; import CswConnector from "./CswConnector"; import Registry from "@magda/typescript-common/dist/registry/AuthorizedRegistryClient"; import * as moment from "moment"; import * as URI from "urijs"; import * as lodash from "lodash"; import * as jsonpath from "jsonpath"; import datasetAspectBuilders from "./datasetAspectBuilders"; import distributionAspectBuilders from "./distributionAspectBuilders"; import organizationAspectBuilders from "./organizationAspectBuilders"; import * as yargs from "yargs"; >>>>>>> import Csw from "./Csw"; import JsonConnector from "@magda/typescript-common/dist/JsonConnector"; import Registry from "@magda/typescript-common/dist/registry/AuthorizedRegistryClient"; import createTransformer from "./createTransformer"; import datasetAspectBuilders from "./datasetAspectBuilders"; import distributionAspectBuilders from "./distributionAspectBuilders"; import organizationAspectBuilders from "./organizationAspectBuilders"; import * as yargs from "yargs"; <<<<<<< .option('interactive', { describe: 'Run the connector in an interactive mode with a REST API, instead of running a batch connection job.', type: 'boolean', default: false }) .option('listenPort', { describe: 'The port on which to run the REST API when in interactive model.', type: 'number', default: 6113 }) .option('timeout', { describe: 'When in --interactive mode, the time in seconds to wait without servicing an REST API request before shutting down. If 0, there is no timeout and the process will never shut down.', type: 'number', default: 0 }) .argv; ======= .option("jwtSecret", { describe: "The shared secret for intra-network communication", type: "string", demand: true, default: process.env.JWT_SECRET || process.env.npm_package_config_jwtSecret }) .option("userId", { describe: "The user id to use when making authenticated requests to the registry", type: "string", demand: true, default: process.env.USER_ID || process.env.npm_package_config_userId }).argv; >>>>>>> .option('interactive', { describe: 'Run the connector in an interactive mode with a REST API, instead of running a batch connection job.', type: 'boolean', default: false }) .option('listenPort', { describe: 'The port on which to run the REST API when in interactive model.', type: 'number', default: 6113 }) .option('timeout', { describe: 'When in --interactive mode, the time in seconds to wait without servicing an REST API request before shutting down. If 0, there is no timeout and the process will never shut down.', type: 'number', default: 0 }) .option("jwtSecret", { describe: "The shared secret for intra-network communication", type: "string", demand: true, default: process.env.JWT_SECRET || process.env.npm_package_config_jwtSecret }) .option("userId", { describe: "The user id to use when making authenticated requests to the registry", type: "string", demand: true, default: process.env.USER_ID || process.env.npm_package_config_userId }).argv;
<<<<<<< export function ensureSchemaNotAlreadyDefined(schema : Schema | undefined | null, propertyKey : string | symbol) { if (schema) { throw new ConstraintDefinitionError(`A validation schema already exists for property: ${ String(propertyKey) }`); } } function getDesignType(target : Object, targetKey : string | symbol) : any { return Reflect.getMetadata("design:type", target, targetKey); ======= export interface AnyClass { new(...args: any[]): any; >>>>>>> export function ensureSchemaNotAlreadyDefined(schema : Schema | undefined | null, propertyKey : string | symbol) { if (schema) { throw new ConstraintDefinitionError(`A validation schema already exists for property: ${ String(propertyKey) }`); } } export interface AnyClass { new(...args: any[]): any;
<<<<<<< AnyConstraints, ArrayConstraints, BooleanConstraints, DateConstraints, FunctionConstraints, JoiSchema, NumberConstraints, ObjectConstraints, StringConstraints ======= AnyConstraints, ArrayConstraints, BooleanConstraints, DateConstraints, FunctionConstraints, NumberConstraints, ObjectConstraints, StringConstraints, >>>>>>> AnyConstraints, ArrayConstraints, BooleanConstraints, DateConstraints, FunctionConstraints, JoiSchema, NumberConstraints, ObjectConstraints, StringConstraints,
<<<<<<< import { _kendrite_workbench_hookInstantiationService } from 'vs/kendryte/vs/platform/vscode/electron-browser/createChannels.injection'; ======= import { MulitExtensionManagementService } from 'vs/platform/extensionManagement/node/multiExtensionManagement'; import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver'; import { RemoteAuthorityResolverChannelClient } from 'vs/platform/remote/node/remoteAuthorityResolverChannel'; >>>>>>> import { MulitExtensionManagementService } from 'vs/platform/extensionManagement/node/multiExtensionManagement'; import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver'; import { RemoteAuthorityResolverChannelClient } from 'vs/platform/remote/node/remoteAuthorityResolverChannel'; import { _kendrite_workbench_hookInstantiationService } from 'vs/kendryte/vs/platform/vscode/electron-browser/createChannels.injection';
<<<<<<< import { mnemonicMenuLabel as baseMnemonicLabel, unmnemonicLabel } from 'vs/base/common/labels'; ======= import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { mnemonicMenuLabel as baseMnemonicLabel } from 'vs/base/common/labels'; >>>>>>> import { mnemonicMenuLabel as baseMnemonicLabel } from 'vs/base/common/labels'; <<<<<<< @IUpdateService private updateService: IUpdateService, @IConfigurationService private configurationService: IConfigurationService, @IWindowsMainService private windowsMainService: IWindowsMainService, @IEnvironmentService private environmentService: IEnvironmentService, @ITelemetryService private telemetryService: ITelemetryService, @IHistoryMainService private historyMainService: IHistoryMainService, @ILabelService private labelService: ILabelService, @IStateService private stateService: IStateService, @ILifecycleService private lifecycleService: ILifecycleService ======= @IUpdateService private readonly updateService: IUpdateService, @IInstantiationService instantiationService: IInstantiationService, @IConfigurationService private readonly configurationService: IConfigurationService, @IWindowsMainService private readonly windowsMainService: IWindowsMainService, @IEnvironmentService private readonly environmentService: IEnvironmentService, @ITelemetryService private readonly telemetryService: ITelemetryService, @IHistoryMainService private readonly historyMainService: IHistoryMainService, @IStateService private readonly stateService: IStateService, @ILifecycleService private readonly lifecycleService: ILifecycleService >>>>>>> @IUpdateService private readonly updateService: IUpdateService, @IConfigurationService private readonly configurationService: IConfigurationService, @IWindowsMainService private readonly windowsMainService: IWindowsMainService, @IEnvironmentService private readonly environmentService: IEnvironmentService, @ITelemetryService private readonly telemetryService: ITelemetryService, @IHistoryMainService private readonly historyMainService: IHistoryMainService, @IStateService private readonly stateService: IStateService, @ILifecycleService private readonly lifecycleService: ILifecycleService
<<<<<<< export function FuncSchema(schemaBuilder?: (schema: FunctionSchema) => FunctionSchema) : PropertyDecorator { return typeConstraintDecorator([Function], (Joi) => { let schema = Joi.func(); if (schemaBuilder) { schema = schemaBuilder(schema); } return schema; ======= export function FuncSchema() : TypedPropertyDecorator<AllowedPropertyTypes> { return typeConstraintDecorator<AllowedPropertyTypes>((Joi) => { return Joi.func(); >>>>>>> export function FuncSchema(schemaBuilder?: (schema: FunctionSchema) => FunctionSchema) : TypedPropertyDecorator<AllowedPropertyTypes> { return typeConstraintDecorator<AllowedPropertyTypes>((Joi) => { let schema = Joi.func(); if (schemaBuilder) { schema = schemaBuilder(schema); } return schema;
<<<<<<< Uri } from "../../../src/constraints/string"; import * as Joi from "joi"; import {Validator} from "../../../src/Validator"; import { testConstraint, testConversion, testConstraintWithPojos } from '../testUtil'; ======= Uri, } from '../../../src/constraints/string'; import * as Joi from 'joi'; import { Validator } from '../../../src/Validator'; import { testConstraint, testConversion } from '../testUtil'; >>>>>>> Uri, } from '../../../src/constraints/string'; import * as Joi from 'joi'; import { Validator } from '../../../src/Validator'; import { testConstraint, testConversion, testConstraintWithPojos } from '../testUtil'; <<<<<<< const expected: any = { myProperty: Joi.string().length(5) ======= const expected: any = { myProperty: Joi.string().length(5), >>>>>>> const expected: any = { myProperty: Joi.string().length(5), <<<<<<< @Replace(/test/g, "new") myProperty: string; ======= @Replace(/test/g, 'new') myProperty: string; >>>>>>> @Replace(/test/g, 'new') myProperty: string; <<<<<<< (obj: MyClass) => obj.myProperty, [ ["test", "new"] ], [ "asdf" ] ======= (obj: MyClass) => obj.myProperty, [['test', 'new']], ['asdf'], >>>>>>> (obj: MyClass) => obj.myProperty, [['test', 'new']], ['asdf'],
<<<<<<< export function NumberSchema(schemaBuilder?: (schema: NumberSchema) => NumberSchema) : PropertyDecorator { return typeConstraintDecorator([Number], (Joi) => { let schema = Joi.number(); if (schemaBuilder) { schema = schemaBuilder(schema); } return schema; ======= export function NumberSchema() : TypedPropertyDecorator<AllowedPropertyTypes> { return typeConstraintDecorator<AllowedPropertyTypes>((Joi) => { return Joi.number(); >>>>>>> export function NumberSchema(schemaBuilder?: (schema: NumberSchema) => NumberSchema) : TypedPropertyDecorator<AllowedPropertyTypes> { return typeConstraintDecorator<AllowedPropertyTypes>((Joi) => { let schema = Joi.number(); if (schemaBuilder) { schema = schemaBuilder(schema); } return schema;
<<<<<<< import { _kendryte_main_hookInstantiationService } from 'vs/kendryte/vs/code/electron-main/createServices.injection'; ======= import { ISignService } from 'vs/platform/sign/common/sign'; import { IDiagnosticsService } from 'vs/platform/diagnostics/common/diagnosticsService'; import { DiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsIpc'; import { FileService } from 'vs/platform/files/common/fileService'; import { IFileService } from 'vs/platform/files/common/files'; import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider'; import { ExtensionHostDebugBroadcastChannel } from 'vs/platform/debug/common/extensionHostDebugIpc'; >>>>>>> import { ISignService } from 'vs/platform/sign/common/sign'; import { IDiagnosticsService } from 'vs/platform/diagnostics/common/diagnosticsService'; import { DiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsIpc'; import { FileService } from 'vs/platform/files/common/fileService'; import { IFileService } from 'vs/platform/files/common/files'; import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider'; import { ExtensionHostDebugBroadcastChannel } from 'vs/platform/debug/common/extensionHostDebugIpc'; import { _kendryte_main_hookInstantiationService } from 'vs/kendryte/vs/code/electron-main/createServices.injection'; <<<<<<< const appInstantiationService = this.instantiationService.createChild(services); _kendryte_main_hookInstantiationService(services, this.electronIpcServer, appInstantiationService); ======= >>>>>>>
<<<<<<< import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { CommandLineDialogService } from 'vs/platform/dialogs/node/dialogService'; import { ILabelService, LabelService } from 'vs/platform/label/common/label'; import { createWaitMarkerFile } from 'vs/code/node/wait'; import 'vs/kendryte/vs/code/code.main'; function createServices(args: ParsedArgs, bufferLogService: BufferLogService): IInstantiationService { const services = new ServiceCollection(); const environmentService = new EnvironmentService(args, process.execPath); const logService = new MultiplexLogService([new ConsoleLogMainService(getLogLevel(environmentService)), bufferLogService]); process.once('exit', () => logService.dispose()); setTimeout(() => cleanupOlderLogs(environmentService).then(null, err => console.error(err)), 10000); services.set(IEnvironmentService, environmentService); services.set(ILabelService, new LabelService(environmentService, void 0, void 0)); services.set(ILogService, logService); services.set(IWorkspacesMainService, new SyncDescriptor(WorkspacesMainService)); services.set(IHistoryMainService, new SyncDescriptor(HistoryMainService)); services.set(ILifecycleService, new SyncDescriptor(LifecycleService)); services.set(IStateService, new SyncDescriptor(StateService)); services.set(IConfigurationService, new SyncDescriptor(ConfigurationService)); services.set(IRequestService, new SyncDescriptor(RequestService)); services.set(IURLService, new SyncDescriptor(URLService)); services.set(IBackupMainService, new SyncDescriptor(BackupMainService)); services.set(IDialogService, new SyncDescriptor(CommandLineDialogService)); services.set(IDiagnosticsService, new SyncDescriptor(DiagnosticsService)); return new InstantiationService(services, true); } /** * Cleans up older logs, while keeping the 10 most recent ones. */ async function cleanupOlderLogs(environmentService: EnvironmentService): Promise<void> { const currentLog = path.basename(environmentService.logsPath); const logsRoot = path.dirname(environmentService.logsPath); const children = await readdir(logsRoot); const allSessions = children.filter(name => /^\d{8}T\d{6}$/.test(name)); const oldSessions = allSessions.sort().filter((d, i) => d !== currentLog); const toDelete = oldSessions.slice(0, Math.max(0, oldSessions.length - 9)); await Promise.all(toDelete.map(name => rimraf(path.join(logsRoot, name)))); } function createPaths(environmentService: IEnvironmentService): Thenable<any> { const paths = [ environmentService.extensionsPath, environmentService.nodeCachedDataDir, environmentService.logsPath, environmentService.globalStorageHome, environmentService.workspaceStorageHome ]; return Promise.all(paths.map(path => path && mkdirp(path))); } ======= >>>>>>> import 'vs/kendryte/vs/code/code.main';
<<<<<<< import { ILabelService } from 'vs/platform/label/common/label'; import { _kendrite_workbench_hookInstantiationService } from 'vs/kendryte/vs/platform/vscode/electron-browser/createChannels'; ======= import { ILabelService, LabelService } from 'vs/platform/label/common/label'; import { IDownloadService } from 'vs/platform/download/common/download'; import { DownloadService } from 'vs/platform/download/node/downloadService'; import { runWhenIdle } from 'vs/base/common/async'; import { TextResourcePropertiesService } from 'vs/workbench/services/textfile/electron-browser/textResourcePropertiesService'; >>>>>>> import { ILabelService, LabelService } from 'vs/platform/label/common/label'; import { IDownloadService } from 'vs/platform/download/common/download'; import { DownloadService } from 'vs/platform/download/node/downloadService'; import { runWhenIdle } from 'vs/base/common/async'; import { TextResourcePropertiesService } from 'vs/workbench/services/textfile/electron-browser/textResourcePropertiesService'; import { _kendrite_workbench_hookInstantiationService } from 'vs/kendryte/vs/platform/vscode/electron-browser/createChannels'; <<<<<<< _kendrite_workbench_hookInstantiationService(serviceCollection, this.mainProcessClient, instantiationService); ======= // Warm up font cache information before building up too many dom elements restoreFontInfo(this.storageService); readFontInfo(BareFontInfo.createFromRawSettings(this.configurationService.getValue('editor'), browser.getZoomLevel())); this._register(this.storageService.onWillSaveState(() => { saveFontInfo(this.storageService); // Keep font info for next startup around })); >>>>>>> // Warm up font cache information before building up too many dom elements restoreFontInfo(this.storageService); readFontInfo(BareFontInfo.createFromRawSettings(this.configurationService.getValue('editor'), browser.getZoomLevel())); this._register(this.storageService.onWillSaveState(() => { saveFontInfo(this.storageService); // Keep font info for next startup around })); _kendrite_workbench_hookInstantiationService(serviceCollection, this.mainProcessClient, instantiationService);
<<<<<<< import { nativeSep } from 'vs/base/common/paths'; import { _kendrite_main_hookInstantiationService } from 'vs/kendryte/vs/code/electron-main/createServices'; ======= import { nativeSep, join } from 'vs/base/common/paths'; import { homedir } from 'os'; import { localize } from 'vs/nls'; >>>>>>> import { nativeSep, join } from 'vs/base/common/paths'; import { homedir } from 'os'; import { localize } from 'vs/nls'; import { _kendrite_main_hookInstantiationService } from 'vs/kendryte/vs/code/electron-main/createServices';
<<<<<<< export * from './utils'; ======= export * from './helpers'; >>>>>>> export * from './helpers'; export * from './utils'; <<<<<<< export { Telegraf } from 'telegraf'; /** * Backward compatibility with versions < 1.4.0, * after removing TelegrafProvider service * TODO: remove that on next major release */ export { Telegraf as TelegrafProvider } from 'telegraf'; ======= export * from './telegraf.types'; >>>>>>> export * from './telegraf.types'; export { Telegraf } from 'telegraf';
<<<<<<< import { Widget, BoxLayout } from "@phosphor/widgets"; ======= import { Widget, BoxLayout } from '@phosphor/widgets'; >>>>>>> import { Widget, BoxLayout } from '@phosphor/widgets'; <<<<<<< ======= import '../style/index.css'; import { JupyterLab } from '@jupyterlab/application'; >>>>>>> import '../style/index.css'; import { JupyterLab } from '@jupyterlab/application'; <<<<<<< if (DATA["url"]) { //check if it's url type datasource if (!Private.isValidURL(DATA["url"])) { let basePath = PathExt.dirname(this.context.localPath); let wholePath = path.join(basePath, DATA["url"]); docManager.services.contents.get(wholePath).then(src => { let local_filetype = PathExt.extname(DATA["url"]).substring(1); let local_values = read(src.content, { type: local_filetype }); this.voyager_cur = CreateVoyager( this.content.node, Private.VoyagerConfig as VoyagerConfig, { values: local_values } ); ======= if(DATA['url']){ //check if it's url type datasource if(!isValidURL(DATA['url'])){ //check if it's local or web url //local url case: have to read in the data through this url let basePath = PathExt.dirname(this._context.localPath) let wholePath = path.join(basePath, DATA['url']) docManager.services.contents.get(wholePath).then(src=>{ let local_filetype = PathExt.extname(DATA['url']).substring(1); let local_values = read(src.content, { type: local_filetype }) this.voyager_cur = CreateVoyager(this.voyager_widget.node, VoyagerPanel.config, {'values':local_values}); >>>>>>> if(DATA['url']){ //check if it's url type datasource if(!isValidURL(DATA['url'])){ //check if it's local or web url //local url case: have to read in the data through this url let basePath = PathExt.dirname(this._context.localPath) let wholePath = path.join(basePath, DATA['url']) docManager.services.contents.get(wholePath).then(src=>{ let local_filetype = PathExt.extname(DATA['url']).substring(1); let local_values = read(src.content, { type: local_filetype }) this.voyager_cur = CreateVoyager(this.voyager_widget.node, VoyagerPanel.config, {'values':local_values}); <<<<<<< } else if (DATA["values"]) { //check if it's array value data source this.voyager_cur = CreateVoyager( this.content.node, Private.VoyagerConfig as VoyagerConfig, values["data"] ); } else { //other conditions, just try to pass the value to voyager and wish the best this.voyager_cur = CreateVoyager( this.content.node, Private.VoyagerConfig as VoyagerConfig, values["data"] ); this.data_src = values["data"]; ======= else{ //web url case: can directly use web url as data source this.voyager_cur = CreateVoyager(this.voyager_widget.node, VoyagerPanel.config, values['data']); } } else if(DATA['values']){ //check if it's array value data source this.voyager_cur = CreateVoyager(this.voyager_widget.node, VoyagerPanel.config, values['data']); } else{//other conditions, just try to pass the value to voyager and wish the best this.voyager_cur = CreateVoyager(this.voyager_widget.node, VoyagerPanel.config, values['data']); this.data_src = values['data']; >>>>>>> else{ //web url case: can directly use web url as data source this.voyager_cur = CreateVoyager(this.voyager_widget.node, VoyagerPanel.config, values['data']); } } else if(DATA['values']){ //check if it's array value data source this.voyager_cur = CreateVoyager(this.voyager_widget.node, VoyagerPanel.config, values['data']); } else{//other conditions, just try to pass the value to voyager and wish the best this.voyager_cur = CreateVoyager(this.voyager_widget.node, VoyagerPanel.config, values['data']); this.data_src = values['data']; <<<<<<< ======= else{ //other conditions, just try to pass the value to voyager and wish the best this.voyager_cur = CreateVoyager(this.voyager_widget.node, VoyagerPanel.config, { values }); this.data_src = {values}; } >>>>>>> else{ //other conditions, just try to pass the value to voyager and wish the best this.voyager_cur = CreateVoyager(this.voyager_widget.node, VoyagerPanel.config, { values }); this.data_src = {values}; } <<<<<<< private _stateChanged = new Signal<this, void>(this); } /**Special VoyagerPanel for using dataframe as data src */ export class VoyagerPanel_DF extends DocumentWidget<Widget> { public voyager_cur!: Voyager; public data_src: any; public fileType = "tempory"; constructor( data: any, fileName: string, context: Context<DocumentRegistry.IModel>, isTable: boolean, app: JupyterLab, docManager: IDocumentManager ) { super({ context, content: new Widget() }); this.addClass(Voyager_CLASS); this.context.ready.then(() => { if (isTable) { this.voyager_cur = CreateVoyager( this.content.node, Private.VoyagerConfig as VoyagerConfig, data ); } else { var DATA = data["data"]; this.data_src = DATA; if (DATA["url"]) { if (!Private.isValidURL(DATA["url"])) { let basePath = PathExt.dirname(this.context.localPath); let filePath = PathExt.basename(DATA["url"]); let wholePath = path.join(basePath, filePath); docManager.services.contents.get(wholePath).then(src => { let local_filetype = PathExt.extname(DATA["url"]).substring(1); let local_values = read(src.content, { type: local_filetype }); this.voyager_cur = CreateVoyager( this.content.node, Private.VoyagerConfig as VoyagerConfig, { values: local_values } ); }); } else { this.voyager_cur = CreateVoyager( this.content.node, Private.VoyagerConfig as VoyagerConfig, data["data"] ); } } else if (DATA["values"]) { //check if it's array value data source this.voyager_cur = CreateVoyager( this.content.node, Private.VoyagerConfig as VoyagerConfig, data["data"] ); } else { //other conditions, just try to pass the value to voyager and wish the best this.voyager_cur = CreateVoyager( this.content.node, Private.VoyagerConfig as VoyagerConfig, data["data"] ); } this.voyager_cur.setSpec({ mark: data["mark"], encoding: data["encoding"], height: data["height"], width: data["width"], description: data["description"], name: data["name"], selection: data["selection"], title: data["title"], transform: data["transform"] }); } this.title.label = fileName; }); // Toolbar this.toolbar.addClass(VOYAGER_PANEL_TOOLBAR_CLASS); this.toolbar.addItem("save", Private.createSaveButton(this)); this.toolbar.addItem( "saveAs", Private.createExportButton(this, app, docManager) ); this.toolbar.addItem( "ExportToNotebook", Private.createCopyButton(this, app, docManager) ); this.toolbar.addItem("undo", Private.createUndoButton(this)); this.toolbar.addItem("redo", Private.createRedoButton(this)); ======= /** * A signal that emits when editor layout state changes and needs to be saved. */ get stateChanged(): ISignal<this, void> { return this._stateChanged; >>>>>>> /** * A signal that emits when editor layout state changes and needs to be saved. */ get stateChanged(): ISignal<this, void> { return this._stateChanged; <<<<<<< export function createRedoButton( widget: VoyagerPanel | VoyagerPanel_DF ): ToolbarButton { return new ToolbarButton({ className: TOOLBAR_REDO_CLASS, onClick: () => { (widget as VoyagerPanel).voyager_cur.redo(); }, tooltip: "Redo" }); } export function isValidURL(str: string) { var a = document.createElement("a"); a.href = str; return a.host && a.host != window.location.host; } ======= >>>>>>>
<<<<<<< import { TYPE_YOUTUBE } from ".."; import { isEmpty, getYoutTubeVideoId } from "../utils"; ======= import { getVideoId } from '../utils'; import { TYPE_YOUTUBE } from '..'; import { isEmpty } from '../utils'; >>>>>>> import { TYPE_YOUTUBE } from ".."; import { isEmpty, getYoutTubeVideoId } from "../utils"; import { getVideoId } from '../utils'; <<<<<<< const id = getYoutTubeVideoId(url); ======= const { id } = { id: getVideoId(url) }; >>>>>>> const id = getYoutTubeVideoId(url); <<<<<<< title: htmlDoc.querySelector('title').textContent, ======= title: htmlDoc.querySelector('title').innerText, >>>>>>> title: htmlDoc.querySelector('title').innerText,
<<<<<<< path: 'book/search', loadChildren: '../components/book/search-results/search-results.module#SearchResultsModule' }, { ======= path: 'book/donate/:id', component: DonatePageComponent, canActivate: [AuthGuardUser] }, { >>>>>>> path: 'book/search', loadChildren: '../components/book/search-results/search-results.module#SearchResultsModule' }, { path: 'book/donate/:id', component: DonatePageComponent, canActivate: [AuthGuardUser] }, {
<<<<<<< import { ImageResult, ResizeOptions } from 'ng2-imageupload'; import { DomSanitizer } from '@angular/platform-browser'; ======= import { ImageResult } from 'ng2-imageupload'; import { Ng2ImgMaxService } from 'ng2-img-max'; >>>>>>> import { ImageResult, ResizeOptions } from 'ng2-imageupload'; import { DomSanitizer } from '@angular/platform-browser'; import { Ng2ImgMaxService } from 'ng2-img-max';
<<<<<<< path: 'book/list', component: BookListComponent, canActivate: [AuthGuard] }, { ======= path: 'quem-somos', component: QuemSomosComponent }, { >>>>>>> path: 'book/list', component: BookListComponent, canActivate: [AuthGuard] }, { path: 'quem-somos', component: QuemSomosComponent }, {
<<<<<<< fetchPairData, ======= refreshSwap, >>>>>>> fetchPairData, refreshSwap,
<<<<<<< if (!repeatSeason) { await freeAgents.normalizeContractDemands({ type: "dummyExpiringContracts", }); } ======= // Handle jersey number conflicts, which should only exist for players added in free agency, because otherwise it would have been handled at the time of signing const playersByTeam = groupBy( players.filter(p => p.tid >= 0 && p.stats.length > 0), "tid", ); for (const [tidString, roster] of Object.entries(playersByTeam)) { const tid = parseInt(tidString); for (const p of roster) { const jerseyNumber = p.stats[p.stats.length - 1].jerseyNumber; if (!jerseyNumber) { continue; } const conflicts = roster.filter( p2 => p2.stats[p2.stats.length - 1].jerseyNumber === jerseyNumber, ); if (conflicts.length > 1) { // Conflict! Who gets to keep the number? // Player who was on team last year (should only be one at most) let playerWhoKeepsIt = conflicts.find( p => p.stats.length > 1 && p.stats[p.stats.length - 2].tid === tid, ); if (!playerWhoKeepsIt) { // Randomly pick one playerWhoKeepsIt = random.choice(conflicts); } for (const p of conflicts) { if (p !== playerWhoKeepsIt) { p.stats[ p.stats.length - 1 ].jerseyNumber = await player.genJerseyNumber(p); } } } } // One more pass, for players without jersey numbers at all (draft picks) for (const p of roster) { p.stats[p.stats.length - 1].jerseyNumber = await player.genJerseyNumber( p, ); } } >>>>>>> if (!repeatSeason) { await freeAgents.normalizeContractDemands({ type: "dummyExpiringContracts", }); } // Handle jersey number conflicts, which should only exist for players added in free agency, because otherwise it would have been handled at the time of signing const playersByTeam = groupBy( players.filter(p => p.tid >= 0 && p.stats.length > 0), "tid", ); for (const [tidString, roster] of Object.entries(playersByTeam)) { const tid = parseInt(tidString); for (const p of roster) { const jerseyNumber = p.stats[p.stats.length - 1].jerseyNumber; if (!jerseyNumber) { continue; } const conflicts = roster.filter( p2 => p2.stats[p2.stats.length - 1].jerseyNumber === jerseyNumber, ); if (conflicts.length > 1) { // Conflict! Who gets to keep the number? // Player who was on team last year (should only be one at most) let playerWhoKeepsIt = conflicts.find( p => p.stats.length > 1 && p.stats[p.stats.length - 2].tid === tid, ); if (!playerWhoKeepsIt) { // Randomly pick one playerWhoKeepsIt = random.choice(conflicts); } for (const p of conflicts) { if (p !== playerWhoKeepsIt) { p.stats[ p.stats.length - 1 ].jerseyNumber = await player.genJerseyNumber(p); } } } } // One more pass, for players without jersey numbers at all (draft picks) for (const p of roster) { p.stats[p.stats.length - 1].jerseyNumber = await player.genJerseyNumber( p, ); } }
<<<<<<< import {Analyzer} from '../analyzer'; import {Descriptor, DocumentDescriptor, ImportDescriptor} from '../ast/ast'; ======= import {Descriptor, ImportDescriptor, InlineDocumentDescriptor} from '../ast/ast'; import {HtmlEntityFinder} from './html-entity-finder'; >>>>>>> import {Descriptor, ImportDescriptor, InlineDocumentDescriptor} from '../ast/ast'; <<<<<<< analyzer: Analyzer; constructor(analyzer: Analyzer) { this.analyzer = analyzer; } ======= >>>>>>> <<<<<<< let promises: Promise<ImportDescriptor|DocumentDescriptor>[] = []; await visit(async(node) => { ======= let entities: (ImportDescriptor<ASTNode> | InlineDocumentDescriptor<ASTNode>)[] = []; await visit(async (node) => { >>>>>>> let entities: (ImportDescriptor<ASTNode>| InlineDocumentDescriptor<ASTNode>)[] = []; await visit(async(node) => {
<<<<<<< InOperatorInteraction, Interactions, ======= Interaction, >>>>>>> InOperatorInteraction, Interaction,
<<<<<<< // reset // TODO(dz) this should really be a class with proper constructor nextFnNum = 0 let outLns = file.getChildren() .map(emitNode) .reduce((p, c) => p.concat(c), []) let output = outLns.join("\n"); result.outfiles[file.fileName.replace(/(\.py)?\.\w*$/i, '') + '.py'] = output; ======= try { let outLns = file.getChildren() .map(emitNode) .reduce((p, c) => p.concat(c), []) let output = outLns.join("\n"); result.outfiles[file.fileName.replace(/(\.py)?\.\w*$/i, '') + '.py'] = output; } catch (e) { pxt.reportException(e); // TODO better reporting result.success = false; } >>>>>>> try { // reset // TODO(dz) this should really be a class with proper constructor nextFnNum = 0 let outLns = file.getChildren() .map(emitNode) .reduce((p, c) => p.concat(c), []) let output = outLns.join("\n"); result.outfiles[file.fileName.replace(/(\.py)?\.\w*$/i, '') + '.py'] = output; } catch (e) { pxt.reportException(e); // TODO better reporting result.success = false; }
<<<<<<< import { ACTION_TYPES as CONNECTION_ACTION_TYPES, DisconnectAction } from '../../connectionActions' import { RegionSettings, Trades } from '../../types' ======= import { Action } from 'redux' import { DISCONNECT_SERVICES } from '../../connectionActions' import { Trades } from '../../types' >>>>>>> import { ACTION_TYPES as CONNECTION_ACTION_TYPES, DisconnectAction } from '../../connectionActions' import { Trades } from '../../types'
<<<<<<< export const PRICE_STALE_AFTER_X_IN_MS = 6000 export interface Rate { bigFigure: number rawRate: number ratePrecision: number pipFraction: number pipPrecision: number pips: number } export enum Direction { Sell = 'Sell', Buy = 'Buy', } export enum PriceMovementTypes { Up = 'Up', Down = 'Down', None = 'None', } ======= >>>>>>> export const PRICE_STALE_AFTER_X_IN_MS = 6000 export interface Rate { bigFigure: number rawRate: number ratePrecision: number pipFraction: number pipPrecision: number pips: number }
<<<<<<< import { ACTION_TYPES as CONNECTION_ACTION_TYPES, DisconnectAction } from '../connectionStatus' import { buildNotification } from '../notification/notificationUtils' ======= >>>>>>> import { ACTION_TYPES as CONNECTION_ACTION_TYPES, DisconnectAction } from '../connectionStatus'
<<<<<<< import { fromEventPattern } from 'rxjs' ======= import { excelAdapter } from './excel' >>>>>>> import { fromEventPattern } from 'rxjs' import { excelAdapter } from './excel'
<<<<<<< export const spotTileEpicsCreator = combineEpics(executeTradeEpic, onTradeExecuted) ======= export const spotTileEpic = combineEpics(executeTradeEpic, displayCurrencyChart, onTradeExecuted) >>>>>>> export const spotTileEpic = combineEpics(executeTradeEpic, onTradeExecuted)
<<<<<<< import { Browser, Finsemble, OpenFin, PlatformAdapter, Symphony, Glue42 } from './' ======= import { Browser, Finsemble, OpenFin, Symphony } from './' >>>>>>> import { Browser, Finsemble, OpenFin, Symphony, Glue42 } from './' <<<<<<< const getPlatform: () => PlatformAdapter = () => { ======= export const getPlatformAsync = async () => { >>>>>>> export const getPlatformAsync = async () => { <<<<<<< if (isGlue42) { console.log('Using Glue42 API') return new Glue42() } ======= >>>>>>> if (isGlue42) { console.log('Using Glue42 API') return new Glue42() }
<<<<<<< function createShadowValue(name: string, type: string, v?: string, shadowType?: string): Element { ======= function createShadowValue(name: string, type: string, v?: string): Element { if (v && v.slice(0, 1) == "\"") v = JSON.parse(v); >>>>>>> function createShadowValue(name: string, type: string, v?: string, shadowType?: string): Element { if (v && v.slice(0, 1) == "\"") v = JSON.parse(v);
<<<<<<< import rootReducer, { GlobalState } from './combineReducers' ======= import rootReducer from './combineReducers' import { compositeStatusServiceEpic } from './shell/compositeStatus' import { connectionStatusEpic } from './shell/connectionStatus' import { linkEpic } from './shell/epics' import { openfinEpic } from './shell/openFin/epics' >>>>>>> import { compositeStatusServiceEpic } from './shell/compositeStatus' import { connectionStatusEpic } from './shell/connectionStatus'
<<<<<<< } else if (parsed.flags["just"]) { ======= } if (hasArg("just")) { >>>>>>> } if (parsed.flags["just"]) { <<<<<<< } else if (parsed.flags["sourceMaps"]) { ======= } if (hasArg("include-source-maps")) { >>>>>>> } if (parsed.flags["sourceMaps"]) { <<<<<<< electron: !!parsed.flags["electron"], browser: parsed.flags["browser"] as string ======= electron: hasArg("electron"), externalHandlers: externalMessageHandlers || void 0, browser >>>>>>> electron: !!parsed.flags["electron"], externalHandlers: externalMessageHandlers || void 0, browser: parsed.flags["browser"] as string <<<<<<< function extensionAsync(parsed: commandParser.ParsedCommand) { const add = parsed.arguments[0]; let dat = { "config": "ws", "tag": "v0", "replaceFiles": { "/generated/xtest.cpp": "namespace xtest {\n GLUE void hello()\n {\n uBit.panic(123);\n " + add + " }\n}\n", "/generated/extpointers.inc": "(uint32_t)(void*)::xtest::hello,\n", "/generated/extensions.inc": "#include \"xtest.cpp\"\n" }, "dependencies": {} } let dat2 = { data: new Buffer(JSON.stringify(dat), "utf8").toString("base64") } return Cloud.privateRequestAsync({ url: "compile/extension", data: dat2 }) .then(resp => { console.log(resp.json) }) } ======= >>>>>>> <<<<<<< export function buildAsync(parsed: commandParser.ParsedCommand) { forceCloudBuild = !!parsed.flags["cloud"]; ======= function stringifyTranslations(strings: pxt.Map<string>): string { const trg: pxt.Map<string> = {}; Object.keys(strings).sort().forEach(k => { const v = strings[k].trim(); if (v) trg[k] = v; }) if (Object.keys(trg).length == 0) return undefined; else return JSON.stringify(trg, null, 2); } export function buildAsync(arg?: string) { if (arg && arg.replace(/-*/g, "") === "cloud") { forceCloudBuild = true; } >>>>>>> function stringifyTranslations(strings: pxt.Map<string>): string { const trg: pxt.Map<string> = {}; Object.keys(strings).sort().forEach(k => { const v = strings[k].trim(); if (v) trg[k] = v; }) if (Object.keys(trg).length == 0) return undefined; else return JSON.stringify(trg, null, 2); } export function buildAsync(parsed: commandParser.ParsedCommand) { forceCloudBuild = !!parsed.flags["cloud"]; <<<<<<< function initCommands() { // Top level commands simpleCmd("help", "display this message or info about a command", pc => { p.printHelp(pc.arguments, console.log) return Promise.resolve(); }, "[all|command]"); simpleCmd("init", "start new package (library) in current directory", initAsync); simpleCmd("deploy", "build and deploy current package", deployAsync); simpleCmd("run", "build and run current package in the simulator", runAsync); simpleCmd("update", "update pxt-core reference and install updated version", updateAsync); simpleCmd("bump", "bump target or package version", bumpAsync); simpleCmd("install", "install new packages, or all package", installAsync, "[package1] [package2] ..."); simpleCmd("add", "add a feature (.asm, C++ etc) to package", addAsync, "<arguments>"); p.defineCommand({ name: "build", help: "build current package", flags: { cloud: { description: "Force build to happen in the cloud" } } }, buildAsync); p.defineCommand({ name: "extract", help: "extract sources from .hex file, folder of .hex files, stdin (-), or URL", argString: "<path>", flags: { code: { description: "generate vscode project files" }, out: { description: "directory to extract the project into", argument: "DIRNAME" } ======= function webstringsJson() { let missing: Map<string> = {} for (let fn of onlyExts(nodeutil.allFiles("docfiles"), [".html"])) { let res = pxt.docs.translate(fs.readFileSync(fn, "utf8"), {}) U.jsonCopyFrom(missing, res.missing) } U.iterMap(missing, (k, v) => { missing[k] = k }) missing = U.sortObjectFields(missing) return missing } interface Command { name: string; fn: () => void; argDesc: string; desc: string; priority?: number; } let cmds: Command[] = [] function cmd(desc: string, cb: (...args: string[]) => Promise<void>, priority = 0) { let m = /^(\S+)(\s*)(.*?)\s+- (.*)/.exec(desc) cmds.push({ name: m[1], argDesc: m[3], desc: m[4], fn: cb, priority: priority }) } cmd("help [all] - display this message", helpAsync) cmd("init - start new package (library) in current directory", initAsync) cmd("install [PACKAGE...] - install new packages, or all packages", installAsync) cmd("build [--cloud] - build current package, --cloud forces a build in the cloud", buildAsync) cmd("deploy - build and deploy current package", deployAsync) cmd("run - build and run current package in the simulator", runAsync) cmd("extract [--code] [--out DIRNAME] [FILENAME] - extract sources from .hex file, folder of .hex files, stdin (-), or URL", extractAsync) cmd("test - run tests on current package", testAsync, 1) cmd("gendocs [--locs] [--docs] - build current package and its docs. --locs produce localization files, --docs produce docs files", gendocsAsync, 1) cmd("format [-i] file.ts... - pretty-print TS files; -i = in-place", formatAsync, 1) cmd("testassembler - test the assemblers", testAssemblers, 1) cmd("decompile file.ts... - decompile ts files and produce similarly named .blocks files", decompileAsync, 1) cmd("testdecompiler DIR - decompile files from DIR one-by-one and compare to baselines", testDecompilerAsync, 1) cmd("testdecompilererrors DIR - decompile unsupported files from DIR one-by-one and check for errors", testDecompilerErrorsAsync, 1) cmd("testdir DIR - compile files from DIR one-by-one", testDirAsync, 1) cmd("testconv JSONURL - test TD->TS converter", testConverterAsync, 2) cmd("snippets [--re NAME] [--i] - verifies that all documentation snippets compile to blocks", testSnippetsAsync) cmd("serve [-yt] [-browser NAME] - start web server for your local target; -yt = use local yotta build", serveAsync) cmd("update - update pxt-core reference and install updated version", updateAsync) cmd("buildtarget - build pxtarget.json", () => buildTargetAsync().then(() => { }), 1) cmd("bump [--noupdate] - bump target or package version", bumpAsync) cmd("uploadtrg [LABEL] - upload target release", uploadTargetAsync, 1) cmd("uploadtrgtranslations [--docs] - upload translations for target, --docs uploads markdown as well", uploadTargetTranslationsAsync, 1) cmd("downloadtrgtranslations [PACKAGE] - download translations from bundled projects", downloadTargetTranslationsAsync, 1) cmd("checkdocs - check docs for broken links, typing errors, etc...", checkDocsAsync, 1) cmd("gist - publish current package to an anonymous gist", publishGistAsync) cmd("login ACCESS_TOKEN - set access token config variable", loginAsync, 1) cmd("logout - clears access token", logoutAsync, 1) cmd("add ARGUMENTS... - add a feature (.asm, C++ etc) to package", addAsync) cmd("search QUERY... - search GitHub for a published package", searchAsync) cmd("pkginfo USER/REPO - show info about named GitHub packge", pkginfoAsync) cmd("api PATH [DATA] - do authenticated API call", apiAsync, 1) cmd("pokecloud - same as 'api pokecloud {}'", () => apiAsync("pokecloud", "{}"), 2) cmd("pokerepo [-u] REPO - refresh repo, or generate a URL to do so", pokeRepoAsync, 2) cmd("travis - upload release and npm package", travisAsync, 1) cmd("uploadfile PATH - upload file under <CDN>/files/PATH", uploadFileAsync, 1) cmd("service OPERATION - simulate a query to web worker", serviceAsync, 2) cmd("time - measure performance of the compiler on the current package", timeAsync, 2) cmd("buildcss - build required css files", buildSemanticUIAsync, 10) cmd("buildwebstrings - build webstrings.json", buildWebStringsAsync, 10) cmd("crowdin CMD PATH [OUTPUT] - upload, download files to/from crowdin", execCrowdinAsync, 2); function showHelp(showAll = true) { let f = (s: string, n: number) => { while (s.length < n) { s += " " } return s } let commandWidth = Math.max(10, 1 + Math.max(...cmds.map(cmd => cmd.name.length))) let argWidth = Math.max(20, 1 + Math.max(...cmds.map(cmd => cmd.argDesc.length))) cmds.forEach(cmd => { if (cmd.priority >= 10) return; if (showAll || !cmd.priority) { console.log(f(cmd.name, commandWidth) + f(cmd.argDesc, argWidth) + cmd.desc); >>>>>>> function webstringsJson() { let missing: Map<string> = {} for (let fn of onlyExts(nodeutil.allFiles("docfiles"), [".html"])) { let res = pxt.docs.translate(fs.readFileSync(fn, "utf8"), {}) U.jsonCopyFrom(missing, res.missing) } U.iterMap(missing, (k, v) => { missing[k] = k }) missing = U.sortObjectFields(missing) return missing } function initCommands() { // Top level commands simpleCmd("help", "display this message or info about a command", pc => { p.printHelp(pc.arguments, console.log) return Promise.resolve(); }, "[all|command]"); simpleCmd("init", "start new package (library) in current directory", initAsync); simpleCmd("deploy", "build and deploy current package", deployAsync); simpleCmd("run", "build and run current package in the simulator", runAsync); simpleCmd("update", "update pxt-core reference and install updated version", updateAsync); simpleCmd("install", "install new packages, or all package", installAsync, "[package1] [package2] ..."); simpleCmd("add", "add a feature (.asm, C++ etc) to package", addAsync, "<arguments>"); simpleCmd("bump", "bump target or package version", bumpAsync); p.defineCommand({ name: "bump", help: "bump target or package version", flags: { noupdate: { description: "Don't publish the updated version" } } }, bumpAsync); p.defineCommand({ name: "build", help: "build current package", flags: { cloud: { description: "Force build to happen in the cloud" } } }, buildAsync); p.defineCommand({ name: "extract", help: "extract sources from .hex file, folder of .hex files, stdin (-), or URL", argString: "<path>", flags: { code: { description: "generate vscode project files" }, out: { description: "directory to extract the project into", argument: "DIRNAME" }
<<<<<<< ======= if (!this.isPresent) { return } >>>>>>> <<<<<<< publishCurrentPositions(ccyPairPositions: any) { ======= publishCurrentPositions(ccyPairPositions) { if (!this.isPresent) { return } >>>>>>> publishCurrentPositions(ccyPairPositions: any) { if (!this.isPresent) { return } <<<<<<< publishPrice(price: any) { ======= publishPrice(price) { if (!this.isPresent) { return } >>>>>>> publishPrice(price: any) { <<<<<<< ======= if (!this.isPresent) { return } >>>>>>> if (!this.isPresent) { return }
<<<<<<< }; const actual = parentMsg.toObject() as mapType; const expected: mapType = { externalEnumsMap: [], externalChildrenMap: [], ======= }, { externalEnumsMap: [] as Array<[number, ExternalEnum]>, externalChildrenMap: [] as Array<[string, { myString: string, }]>, >>>>>>> }; const actual = parentMsg.toObject() as mapType; const expected: mapType = { externalEnumsMap: [] as Array<[number, ExternalEnum]>, externalChildrenMap: [] as Array<[string, { myString: string, }]>,
<<<<<<< import { Bidi} from "./formatting/bidi" import { Hyperlink } from "./links"; ======= import { Bookmark, Hyperlink } from "./links"; >>>>>>> import { Bidi} from "./formatting/bidi" import { Bookmark, Hyperlink } from "./links";
<<<<<<< import { Border, ThematicBreak } from "./formatting/border"; import { Indent } from "./formatting/indent"; ======= import { ThematicBreak } from "./formatting/border"; import { IIndentAttributesProperties, Indent } from "./formatting/indent"; >>>>>>> import { Border, ThematicBreak } from "./formatting/border"; import { IIndentAttributesProperties, Indent } from "./formatting/indent";
<<<<<<< import { FooterReferenceType, HeaderReference, HeaderReferenceType } from "./document/body/section-properties"; import { SectionPropertiesOptions } from "./document/body/section-properties/section-properties"; ======= >>>>>>> import { FooterReferenceType, HeaderReference, HeaderReferenceType } from "./document/body/section-properties"; <<<<<<< ======= import { IMediaData } from "index"; import { FooterReferenceType, HeaderReferenceType, SectionPropertiesOptions } from "./document/body/section-properties"; >>>>>>> import { FooterReferenceType, HeaderReferenceType, SectionPropertiesOptions } from "./document/body/section-properties";
<<<<<<< const newJson = Utility.jsonify(thematicBreak); const attributes = { color: "auto", space: 1, val: "single", sz: 6, }; assert.equal(JSON.stringify(newJson.root[0].root[0].root), JSON.stringify(attributes)); ======= const tree = new Formatter().format(thematicBreak); expect(tree).to.deep.equal({ "w:pBdr": [ { "w:bottom": { _attr: { "w:color": "auto", "w:space": "1", "w:sz": "6", "w:val": "single", }, }, }, ], }); >>>>>>> const tree = new Formatter().format(thematicBreak); expect(tree).to.deep.equal({ "w:pBdr": [ { "w:bottom": { _attr: { "w:color": "auto", "w:space": 1, "w:sz": 6, "w:val": "single", }, }, }, ], });
<<<<<<< import { IPageSizeAttributes } from "./page-size/page-size-attributes"; import { TitlePage } from "./title-page/title-page"; ======= import { IPageSizeAttributes, PageOrientation } from "./page-size/page-size-attributes"; import { FooterReferenceType, IPageNumberTypeAttributes, PageNumberType, PageNumberFormat } from "."; import { HeaderReferenceType } from "./header-reference/header-reference-attributes"; >>>>>>> import { IPageSizeAttributes, PageOrientation } from "./page-size/page-size-attributes"; import { TitlePage } from "./title-page/title-page"; <<<<<<< orientation: "portrait", differentFirstPageHeader: false, ======= orientation: PageOrientation.PORTRAIT, headerType: HeaderReferenceType.DEFAULT, headerId: 0, footerType: FooterReferenceType.DEFAULT, footerId: 0, pageNumberStart: undefined, pageNumberFormatType: PageNumberFormat.DECIMAL, >>>>>>> orientation: PageOrientation.PORTRAIT, differentFirstPageHeader: false, headerType: HeaderReferenceType.DEFAULT, headerId: 0, footerType: FooterReferenceType.DEFAULT, footerId: 0, pageNumberStart: undefined, pageNumberFormatType: PageNumberFormat.DECIMAL, <<<<<<< this.root.push(new HeaderReference("default", 3)); if (mergedOptions.differentFirstPageHeader) { this.root.push(new HeaderReference("first", 5)); this.root.push(new TitlePage()); } this.root.push(new FooterReference()); ======= this.root.push( new HeaderReference({ headerType: mergedOptions.headerType, headerId: mergedOptions.headerId, }), ); this.root.push( new FooterReference({ footerType: mergedOptions.footerType, footerId: mergedOptions.footerId, }), ); this.root.push(new PageNumberType(mergedOptions.pageNumberStart, mergedOptions.pageNumberFormatType)); this.options = mergedOptions; } get Options() { return this.options; >>>>>>> if (mergedOptions.differentFirstPageHeader) { this.root.push( new HeaderReference({ headerType: HeaderReferenceType.FIRST, headerId: 5, }), ); this.root.push(new TitlePage()); } this.root.push( new HeaderReference({ headerType: mergedOptions.headerType, headerId: mergedOptions.headerId, }), ); this.root.push( new FooterReference({ footerType: mergedOptions.footerType, footerId: mergedOptions.footerId, }), ); this.root.push(new PageNumberType(mergedOptions.pageNumberStart, mergedOptions.pageNumberFormatType)); this.options = mergedOptions; } get Options(): SectionPropertiesOptions { return this.options;
<<<<<<< import { FootNotes } from "./footnotes"; import { FirstPageHeaderWrapper, HeaderWrapper } from "./header-wrapper"; ======= import { HeaderWrapper } from "./header-wrapper"; >>>>>>> import { FootNotes } from "./footnotes"; import { HeaderWrapper } from "./header-wrapper"; <<<<<<< private readonly headerWrapper: HeaderWrapper; private readonly footNotes: FootNotes; ======= private readonly headerWrapper: HeaderWrapper[] = []; private readonly footerWrapper: FooterWrapper[] = []; >>>>>>> private readonly headerWrapper: HeaderWrapper[] = []; private readonly footerWrapper: FooterWrapper[] = []; private readonly footNotes: FootNotes; <<<<<<< this.docRelationships.createRelationship( 3, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", "header1.xml", ); this.docRelationships.createRelationship( 5, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", "header2.xml", ); this.docRelationships.createRelationship( 4, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", "footer1.xml", ); this.docRelationships.createRelationship( 6, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes", "footnotes.xml", ); ======= this.contentTypes = new ContentTypes(); >>>>>>> this.contentTypes = new ContentTypes(); this.docRelationships.createRelationship( this.nextId++, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes", "footnotes.xml", ); <<<<<<< this.footNotes = new FootNotes(); ======= if (!sectionPropertiesOptions) { sectionPropertiesOptions = { footerType: FooterReferenceType.DEFAULT, headerType: HeaderReferenceType.DEFAULT, headerId: header.Header.referenceId, footerId: footer.Footer.referenceId, }; } else { sectionPropertiesOptions.headerId = header.Header.referenceId; sectionPropertiesOptions.footerId = footer.Footer.referenceId; } this.document = new Document(sectionPropertiesOptions); >>>>>>> this.footNotes = new FootNotes(); if (!sectionPropertiesOptions) { sectionPropertiesOptions = { footerType: FooterReferenceType.DEFAULT, headerType: HeaderReferenceType.DEFAULT, headerId: header.Header.referenceId, footerId: footer.Footer.referenceId, }; } else { sectionPropertiesOptions.headerId = header.Header.referenceId; sectionPropertiesOptions.footerId = footer.Footer.referenceId; } this.document = new Document(sectionPropertiesOptions); <<<<<<< public createFootnote(paragraph: Paragraph): void { this.footNotes.createFootNote(paragraph); } ======= public addSection(sectionPropertiesOptions: SectionPropertiesOptions): void { this.document.Body.addSection(sectionPropertiesOptions); } /** * Creates new header. */ public createHeader(): HeaderWrapper { const header = new HeaderWrapper(this.media, this.nextId++); this.headerWrapper.push(header); this.docRelationships.createRelationship( header.Header.referenceId, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", `header${this.headerWrapper.length}.xml`, ); this.contentTypes.addHeader(this.headerWrapper.length); return header; } /** * Creates new footer. */ public createFooter(): FooterWrapper { const footer = new FooterWrapper(this.media, this.nextId++); this.footerWrapper.push(footer); this.docRelationships.createRelationship( footer.Footer.referenceId, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", `footer${this.footerWrapper.length}.xml`, ); this.contentTypes.addFooter(this.footerWrapper.length); return footer; } public createFirstPageHeader(): HeaderWrapper { const headerWrapper = this.createHeader(); this.document.Body.DefaultSection.addChildElement( new HeaderReference({ headerType: HeaderReferenceType.FIRST, headerId: headerWrapper.Header.referenceId, }), ); return headerWrapper; } >>>>>>> public addSection(sectionPropertiesOptions: SectionPropertiesOptions): void { this.document.Body.addSection(sectionPropertiesOptions); } public createFootnote(paragraph: Paragraph): void { this.footNotes.createFootNote(paragraph); } /** * Creates new header. */ public createHeader(): HeaderWrapper { const header = new HeaderWrapper(this.media, this.nextId++); this.headerWrapper.push(header); this.docRelationships.createRelationship( header.Header.referenceId, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", `header${this.headerWrapper.length}.xml`, ); this.contentTypes.addHeader(this.headerWrapper.length); return header; } /** * Creates new footer. */ public createFooter(): FooterWrapper { const footer = new FooterWrapper(this.media, this.nextId++); this.footerWrapper.push(footer); this.docRelationships.createRelationship( footer.Footer.referenceId, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", `footer${this.footerWrapper.length}.xml`, ); this.contentTypes.addFooter(this.footerWrapper.length); return footer; } public createFirstPageHeader(): HeaderWrapper { const headerWrapper = this.createHeader(); this.document.Body.DefaultSection.addChildElement( new HeaderReference({ headerType: HeaderReferenceType.FIRST, headerId: headerWrapper.Header.referenceId, }), ); return headerWrapper; }
<<<<<<< const run = new Run({ bold: true, }); const newJson = Utility.jsonify(run); assert.equal(newJson.root[0].root[0].rootKey, "w:b"); assert.equal(newJson.root[0].root[1].rootKey, "w:bCs"); ======= run.bold(); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ "w:r": [ { "w:rPr": [ { "w:b": { _attr: { "w:val": true } } }, { "w:bCs": { _attr: { "w:val": true, }, }, }, ], }, ], }); >>>>>>> const run = new Run({ bold: true, }); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ "w:r": [ { "w:rPr": [ { "w:b": { _attr: { "w:val": true } } }, { "w:bCs": { _attr: { "w:val": true, }, }, }, ], }, ], }); <<<<<<< const run = new Run({ italics: true, }); const newJson = Utility.jsonify(run); assert.equal(newJson.root[0].root[0].rootKey, "w:i"); assert.equal(newJson.root[0].root[1].rootKey, "w:iCs"); ======= run.italics(); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ "w:r": [ { "w:rPr": [ { "w:i": { _attr: { "w:val": true } } }, { "w:iCs": { _attr: { "w:val": true, }, }, }, ], }, ], }); >>>>>>> const run = new Run({ italics: true, }); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ "w:r": [ { "w:rPr": [ { "w:i": { _attr: { "w:val": true } } }, { "w:iCs": { _attr: { "w:val": true, }, }, }, ], }, ], }); <<<<<<< const run = new Run({ smallCaps: true, }); const newJson = Utility.jsonify(run); assert.equal(newJson.root[0].root[0].rootKey, "w:smallCaps"); ======= run.smallCaps(); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ "w:r": [{ "w:rPr": [{ "w:smallCaps": {} }] }], }); >>>>>>> const run = new Run({ smallCaps: true, }); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ "w:r": [{ "w:rPr": [{ "w:smallCaps": {} }] }], }); <<<<<<< const run = new Run({ allCaps: true, }); const newJson = Utility.jsonify(run); assert.equal(newJson.root[0].root[0].rootKey, "w:caps"); ======= run.allCaps(); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ "w:r": [{ "w:rPr": [{ "w:caps": {} }] }], }); >>>>>>> const run = new Run({ allCaps: true, }); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ "w:r": [{ "w:rPr": [{ "w:caps": {} }] }], }); <<<<<<< const run = new Run({ strike: true, }); const newJson = Utility.jsonify(run); assert.equal(newJson.root[0].root[0].rootKey, "w:strike"); ======= run.strike(); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ "w:r": [{ "w:rPr": [{ "w:strike": { _attr: { "w:val": true } } }] }], }); >>>>>>> const run = new Run({ strike: true, }); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ "w:r": [{ "w:rPr": [{ "w:strike": { _attr: { "w:val": true } } }] }], }); <<<<<<< const run = new Run({ doubleStrike: true, }); const newJson = Utility.jsonify(run); assert.equal(newJson.root[0].root[0].rootKey, "w:dstrike"); ======= run.doubleStrike(); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ "w:r": [{ "w:rPr": [{ "w:dstrike": { _attr: { "w:val": true } } }] }], }); >>>>>>> const run = new Run({ doubleStrike: true, }); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ "w:r": [{ "w:rPr": [{ "w:dstrike": { _attr: { "w:val": true } } }] }], });