I am unable to run the testcases with Chutzpah.json as it throws me a file too long error message for some reason in the console output
I have all my unit testcases in UnitTesting Project which is in root folder which also contains WebPortal whereall my references exist
My Project structure is like
WebPortal Project
UnitTesting Project
My chutzpah.json is also in UnitTesting project (Am I referencing it correctly?)
{
"Framework": "jasmine",
"RootReferencePathMode": "SettingsFileDirectory",
"Tests": [
{ "Include": "*/*.js","Exclude": "*/*.d.ts" }
],
"References": [
{ "Path": "../webportal/assets/scripts/angular/angular.min.js", "IsTestFrameworkFile": true },
{ "Path": "../webportal/assets/scripts/angular/angular-mocks.js", "IsTestFrameworkFile": true },
{ "Path": "../webportal/*/*.js", "Includes": [ "*.js" ], "Excludes": ["*.d.ts"] }
]
}
This is the error message I am getting always
---- Discover test started ------
Error: System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
at System.IO.PathHelper.GetFullPathName()
Related
My output tree is showing duplicates and I can't figure out why. This is prototype angular project with this file tree. I can't figure out why.
src
app
components
scss
styles.scss
Here's my out put tree
My sassdoc.json config
{
"basePath": "https://mjhandy.github.io/AngularBoilerPlate/docs/sass/",
"package": {
"title": "Angular Boilerplate",
"name": "ngBoilerplate",
"description": "My boilerplate for basic, resuable, Angular components"
},
"dest": "./docs/sassdoc",
"excliude": [
"./src/scss/_mixins.scss"
],
"groups" : {
"structure" : "Structure",
"component" : "Component",
"helpers" : "Helpers",
"global" : "Global Items",
"mixins" : "Mixins"
},
"options": {
"display": {
"watermark": false
}
}
}
My run commands :
sassdoc ./src/**/* -c sassdoc.json
I ran into the same result with the following command within my package.json scripts
sassdoc 'src/assets/styles/sass/**'
According to the official sassdoc documentation they are using this library to parse glob patterns.
The ** notation matches the directory itself, its containing files and its subdirectories.
But the root directory name is suffice for the sassdoc, it will iterate over its tree structure if any.
sassdoc 'src/assets/styles/sass/*'
# or simply
sassdoc 'src/assets/styles/sass'
How do I specify severity = error for rule import-blacklist of tslint (i.e red squiggly line) ?
I'd like to disallow import that starts with "packages".
I know tslint is going to be obsolete soon but for now we still use tslint.
I tried the following:
"import-blacklist": [
true,
[
"^packages.*$"
],
{
"severity": [
"error"
]
}
]
But it still show yellow squiggly line as warning.
If i use an object as config like:
"import-blacklist": {
"severity": "error",
"options": [
// what should i put here ?
]
}
Where should I put the pattern to ?
Stumbled upon this. So this is what I found working
"import-blacklist": {
"options": ["true", ["#material-ui/core$"]],
"severity": "error"
}
I am trying to use a wild card folder path that is being supplied by getmetadata and foreach. The actual file name within these folders ends with _Problem_1.csv however i get the following error. can anyone advise me on where i am going wrong?
{ "errorCode": "2200", "message": "ErrorCode=UserErrorSourceBlobNotExist,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The
required Blob is missing. Folder path: client-uploads/[{\"name\":\"A001\",\"type\":\"Folder\"},{\"name\":\"A002\",\"type\":\"Folder\"},{\"name\":\"A004\",\"type\":\"Folder\"},{\"name\":\"A006\",\"type\":\"Folder\"},{\"name\":\"A623\",\"type\":\"Folder\"}]/.,Source=Microsoft.DataTransfer.ClientLibrary,'",
"failureType": "UserError", "target": "Copy data1", "details": [] }
You can try having your Copy activity inside the forEach activity and having for each items dynamic expression as below, which will get the list of all Folder names (This will also include file names if any exists in the folder you are pointing in getmetadata activity).
ForEach Activity Dynamic expression:
Items : #activity('getFolderNames').output.childItems
Here are child Items from getMetaData:
{
"childItems": [
{
"name": "A001",
"type": "Folder"
},
{
"name": "A002",
"type": "Folder"
}
],
"effectiveIntegrationRuntime": "DefaultIntegrationRuntime (West US)",
"executionDuration": 0,
"durationInQueue": {
"integrationRuntimeQueue": 0
},
"billingReference": {
"activityType": "PipelineActivity",
"billableDuration": {
"Managed": 0.016666666666666666
}
}
Than you have to use the "item().name" in the wild card file path expression field of copy activity, to get the name of folder per iteration of forEach activity.
In my sample, I have tried below concat expression to point to the correct folder path name for each iteration.
Wildcard Folder path: #{Concat('input/MultipleFolders/', item().name)}
This will return:
For Iteration 1: input/MultipleFolders/A001
For Iteration 2: input/MultipleFolders/A002
Hope this helps..
I have setup path aliases in my tsconfig.json which looks like sop
"paths": {
"#services/*": [ "./src/app/services/*" ],
"#interfaces/*": [ "./src/app/interfaces/*" ],
"#directives/*": [ "./src/app/directives/*" ],
"#enums/*": [ "./src/app/enum/*" ],
"#classes/*": [ "./src/app/class/*" ],
"#components/*": [ "./src/app/main/components/*" ]
},
They are then imported like so
import { PageStateNames } from "#classes/PageStateNames";
import { UsersService } from "#services/users.service";
However, for some reason everything works except for #enums and #classes. Can anyone help me figure out why? The paths are correct, in fact Visual Studio recognises the paths are correct but webpack (at-loader) cannot find the files. But it can recognise the paths for everything else
Let's say I have a public folder which is not discoverable. If I expose the File ID of one of the files for download, is it possible for an untrusted user to obtain a link to the folder which contains that file, or a link to other files within that folder? I've done a search on the Google APIs but haven't found anything relevant.
Edit:
Seems like some of you guys still don't get the question. So let me illustrate with a diagram. Let's say I have a public folder in Google Drive:
Folder A |
|-- File X
|-- File Y
|-- File Z
So the question is, if someone else has the File ID of File X, which I'm fine with, then can he get the File ID of Folder A? Or the File IDs of Files Y and Z? That's where I'm concerned.
If you create a file on Google drive it is just that public.
If you share the file with me, then I have access to it.
If i install an application that has access to my google drive account the owner of the app has access to it (Really they ahve access to all my files)
If i give a copy of the link to my friend they can access it.
I can technically also see what directory the file is in. I can then make a request to see what other files may be within this directory. If the directory is public then I have access to that information.
Only the file you set to public will be accessible.
Files within the same directory as a public file will not be public.
The parent directory will not be public just because it contains a public file.
The point with public drive files is anyone can access them without permissions. The only security you have is that Tom on the street cant just do a search and find your file, or can they will it popup in google search someday?
Update file id:
If you expose the file id then i can take the file id and download the file using the API just like you can using a public api key or using the Google APIs explorer. The file is public anyone can download it that has the id. It was also possible in the past to take the file id and use that to create a URL for download directly though the Google Drive website.
https://docs.google.com/spreadsheets/d/{FileID}/edit#gid=0
https://drive.google.com/drive/folders/{FileID}
This does not always work anymore mostly with files that are of type Google doc.
I can also use the file id to see what directory the file is in and request a list of files within that directory.
Example Testing with a given file id
https://www.googleapis.com/drive/v2/files/1AzP6ISIrC8CvK3rTZfNBJ8qZL6LwcaSI?key={my api key}
or just use the try me on this page
Files.Get
Response
{
"kind": "drive#file",
"id": "1AzP6ISIrC8CvK3rTZfNBJ8qZL6LwcaSI",
"etag": "\"G9mQazc6pdRCuGfUPB_oyY074Ug/MTUxNTY5MzM4NjYxNA\"",
"selfLink": "https://www.googleapis.com/drive/v2/files/1AzP6ISIrC8CvK3rTZfNBJ8qZL6LwcaSI",
"webContentLink": "https://drive.google.com/uc?id=1AzP6ISIrC8CvK3rTZfNBJ8qZL6LwcaSI&export=download",
"alternateLink": "https://drive.google.com/file/d/1AzP6ISIrC8CvK3rTZfNBJ8qZL6LwcaSI/view?usp=drivesdk",
"embedLink": "https://drive.google.com/file/d/1AzP6ISIrC8CvK3rTZfNBJ8qZL6LwcaSI/preview?usp=drivesdk",
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/image/png",
"thumbnailLink": "https://lh3.googleusercontent.com/_vX1BrFIsR-lVnFR1-VS9tp2toDLNfE6Cf1m3RGEIG7--VQfp53OiNbrnLC_rOGmqUbfn6QHQ7c=s220",
"title": "splash.png",
"mimeType": "image/png",
"labels": {
"starred": false,
"hidden": false,
"trashed": false,
"restricted": false,
"viewed": false
},
"createdDate": "2018-01-11T09:31:51.426Z",
"modifiedDate": "2018-01-11T17:56:26.614Z",
"markedViewedByMeDate": "1970-01-01T00:00:00.000Z",
"version": "8",
"parents": [],
"downloadUrl": "https://doc-0g-6o-docs.googleusercontent.com/docs/securesc/1mngaurn1r7pdnvlih02e6t9l8me2de5/3q2i7ak140vftlc9c96evgvnsmri4m4v/1517565600000/18429462472537742596/06030588225573437243/1AzP6ISIrC8CvK3rTZfNBJ8qZL6LwcaSI?e=download&gd=true",
"userPermission": {
"kind": "drive#permission",
"etag": "\"G9mQazc6pdRCuGfUPB_oyY074Ug/WUHObW5vTApa-BsGvLisiOGqWbA\"",
"id": "me",
"selfLink": "https://www.googleapis.com/drive/v2/files/1AzP6ISIrC8CvK3rTZfNBJ8qZL6LwcaSI/permissions/me",
"role": "reader",
"type": "user"
},
"originalFilename": "splash.png",
"fileExtension": "png",
"md5Checksum": "108e62ba72a0b33cb4bc7628e48d2e2c",
"fileSize": "22375",
"quotaBytesUsed": "0",
"ownerNames": [
"WU JUANG CHEN"
],
"owners": [
{
"kind": "drive#user",
"displayName": "WU JUANG CHEN",
"isAuthenticatedUser": false,
"permissionId": "18429462472537742596",
"emailAddress": "XXXX#connect.hku.hk"
}
],
"lastModifyingUserName": "WU JUANG CHEN",
"lastModifyingUser": {
"kind": "drive#user",
"displayName": "WU JUANG CHEN",
"isAuthenticatedUser": false,
"permissionId": "18429462472537742596",
"emailAddress": "xxxxx#connect.hku.hk"
},
"capabilities": {
"canCopy": true,
"canEdit": false
},
"editable": false,
"copyable": true,
"writersCanShare": true,
"shared": true,
"explicitlyTrashed": false,
"appDataContents": false,
"headRevisionId": "0B-l1jDyJ1EfRZERkZnJmcUZxRHlkUzk0bEx6bmhMUzd3WXdrPQ",
"imageMediaMetadata": {
"width": 375,
"height": 812,
"rotation": 0
},
"spaces": [
"drive"
]
}
Analytics
I have your email address "emailAddress": "XXXX#connect.hku.hk" and name
A view link of the file https://drive.google.com/file/d/1AzP6ISIrC8CvK3rTZfNBJ8qZL6LwcaSI/view?usp=drivesdk as well as a download link for it.
Note: "parents": [], should contain the ID of the parent directory for this file. I am going to assume that its either private or in your root directory. If you say that the directory for this file is public i think its an awesome feature of google not to display this.
Which would mean that the answer is if you have the file id you dont necessarily get access to the folder id.